Phương thức jQuery event.isPropagationStopped ()

❮ Phương thức sự kiện jQuery

Thí dụ

Kiểm tra xem event.stopPropagation () có được gọi không:

$("div").click(function(event){
  event.stopPropagation();
  alert(event.isPropagationStopped());
});

Định nghĩa và Cách sử dụng

Phương thức event.isPropagationStopped () kiểm tra xem event.stopPropagation () có được gọi cho sự kiện hay không.

Phương thức này trả về true nếu event.stopPropagation () được gọi và false nếu không.


Cú pháp

event.isPropagationStopped()

Parameter Description
event Required. The event parameter comes from the event binding function

❮ Phương thức sự kiện jQuery