jQuery မိဘ > ကလေး ရွေးချယ်သူ
ဥပမာ
<div> ဒြပ်စင်တစ်ခု၏ တိုက်ရိုက်ကလေးဖြစ်သည့် <span> ဒြပ်စင်အားလုံးကို ရွေးပါ-
$("div > span")
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
("မိဘ > ကလေး") ရွေးချယ်မှုစနစ်သည် သတ်မှတ်ထားသော ဒြပ်စင်၏ တိုက်ရိုက်ကလေးဖြစ်သည့် အစိတ်အပိုင်းအားလုံးကို ရွေးချယ်သည်။
အထားအသို
("parent > child")
Parameter | Description |
---|---|
parent | Required. Specifies the parent element to be selected |
child | Required. Specifies the direct child element (of the specified parent element) to be selected |
ကိုယ်တိုင်စမ်းကြည့်ပါ - ဥပမာ
<li> ဒြပ်စင်အားလုံးကို ရွေးချယ်နည်း အတန်းအမည်တစ်ခုနှင့် <ul> ဒြပ်စင်
တစ်ခု၏ တိုက်ရိုက်ကလေးဖြစ်သည့် <li> ဒြပ်စင်အားလုံးကို ရွေးချယ်နည်း။