event.stopImmediatePropagation()
The event.stopImmediatePropagation()
method in jQuery is used to keeps the rest of the handlers from being executed and prevents the event from bubbling up the DOM tree.
event.stopImmediatePropagation()
property Examplewhether event.stopImmediatePropagation() was called.
$("button").click(function( event ) { console.log( event.isImmediatePropagationStopped() ); // false event.stopImmediatePropagation(); console.log( event.isImmediatePropagationStopped() ); // true });