jQuery event.isPropagationStopped() နည်းလမ်း
ဥပမာ
event.stopPropagation() ကို ခေါ်ခြင်းရှိမရှိ စစ်ဆေးပါ-
$("div").click(function(event){
event.stopPropagation();
alert(event.isPropagationStopped());
});
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
event.isPropagationStopped() နည်းလမ်း သည် event.stopPropagation() ကို ပွဲအတွက် ခေါ်ထားခြင်းရှိမရှိ စစ်ဆေးပေးပါသည်။
event.stopPropagation() ဟုခေါ်ပါက ဤနည်းလမ်းသည် အမှန်အတိုင်းပြန်ဖြစ်မည်ဖြစ်ပြီး မဟုတ်ပါက false ပြန်လာမည်ဖြစ်သည်။
အထားအသို
event.isPropagationStopped()
Parameter | Description |
---|---|
event | Required. The event parameter comes from the event binding function |