jQuery event.isPropagationStopped()Method

jQuery 事件方法jQuery Event Methods

Examples

Check whether event.stopPropagation() has been called:

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

Try it Yourself »

Definition and Usage

The event.isPropagationStopped() method checks whether stopPropagation() has been called on the specified event.event.stopPropagation()。

If event.stopPropagation() is called, the method returns true; otherwise, it returns false.


Syntax

event.isPropagationStopped()

Parameters Description
event Required.eventThe parameter comes from the event binding function.


jQuery 事件方法jQuery Event Methods

Other Extensions