jQuery သည်() Method ဖြစ်သည်။
❮ jQuery ဖြတ်သန်းခြင်းနည်းလမ်းများ
ဥပမာ
<p> ၏ ပင်မသည် <div> ဒြပ်စင်ဖြစ်ပါက၊ စာသားအချို့ကို သတိပေးပါ-
if ($("p").parent().is("div")) {
alert("Parent of p is div");
}
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
is() method သည် ရွေးချယ်ထားသော ဒြပ်စင်များထဲမှ တစ်ခုကို selectorElement နှင့် ကိုက်ညီမှုရှိမရှိ စစ်ဆေး ပါသည်။
အထားအသို
$(selector).is(selectorElement,function(index,element))
Parameter | Description |
---|---|
selectorElement | Required. Specifies a selector expression, element or a jQuery object to match the current set of elements against. Returns true if there is at least one match from the given argument, and false if not. |
function(index,element) |
Optional. Specifies a function to run for the group of selected elements.
|
❮ jQuery ဖြတ်သန်းခြင်းနည်းလမ်းများ