jQuery event.stopPropagation() Method
Stop the click event from bubbling to parent elements:
alert("The span element was clicked.");
alert("The p element was clicked.");
alert("The div element was clicked.");
Try it yourself »
Definition and Usage
The event.stopPropagation() method stops the bubbling of an event to parent elements, preventing any parent event handlers from being executed.
Tip: Use the event.isPropagationStopped() method to check whether this method was called for the event.
|event||Required. The event parameter comes from the event binding function|
Thank You For Helping Us!
Your message has been sent to W3Schools.