jQuery after() နည်းလမ်း
❮ jQuery HTML/CSS နည်းလမ်းများ
ဥပမာ
<p> ဒြပ်စင်တစ်ခုစီပြီးနောက် အကြောင်းအရာကို ထည့်သွင်းပါ-
$("button").click(function(){
$("p").after("<p>Hello world!</p>");
});
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
after() method သည် ရွေးချယ်ထားသော အစိတ်အပိုင်းများပြီးနောက် သတ်မှတ်ထားသော အကြောင်းအရာကို ထည့်သွင်းသည်။
အကြံပြုချက်- ရွေးချယ်ထားသော ဒြပ်စင်များရှေ့တွင် အကြောင်းအရာကို ထည့်သွင်းရန် before() နည်းလမ်းကို အသုံးပြုပါ။
အထားအသို
$(selector).after(content,function(index))
Parameter | Description |
---|---|
content | Required. Specifies the content to insert (can contain HTML tags)
Possible values:
|
function(index) | Specifies a function that returns the content to insert
|
သင်ကိုယ်တိုင်စမ်းကြည့်ပါ - ဥပမာများ
ဖြင့် အကြောင်းအရာကို after() နည်းလမ်းဖြင့် ဖန်တီးပါ။
အသုံးပြု၍ အကြောင်းအရာကို ထည့်သွင်းရန် ရွေးချယ်ထားသော အစိတ်အပိုင်းများပြီးနောက် အကြောင်းအရာကို ထည့်သွင်းရန် လုပ်ဆောင်ချက်ကို အသုံးပြုနည်း။
❮ jQuery HTML/CSS နည်းလမ်းများ