jQuery event.isImmediatePropagationStopped ()เมธอด
ตัวอย่าง
ตรวจสอบว่า event.stopImmediatePropagation() ถูกเรียก:
$("div").click(function(event){
event.stopImmediatePropagation();
alert(event.isImmediatePropagationStopped());
});
ความหมายและการใช้งาน
เมธอดนี้จะตรวจสอบว่าevent.stopImmediatePropagation() ถูกเรียกสำหรับเหตุการณ์หรือไม่
เมธอดนี้คืนค่า จริง หากมีการเรียก event.stopImmediatePropagation() และเป็นเท็จ หากไม่เป็นเช่นนั้น
ไวยากรณ์
event.isImmediatePropagationStopped()
Parameter | Description |
---|---|
event | Required. The event parameter comes from the event binding function |