jQuery Tutorial Tutorials - jQuery event.stopPropagation()

jQuery event.stopPropagation()

The event.stopPropagation method in jQuery will return whether event.stopPropagation() was ever called on this event object.

jQuery event.stopPropagation() property Example

example

whether event.stopPropagation() was called.

$("button").click(function( event ) {
  console.log( event.isPropagationStopped() ); // false
  event.stopPropagation();
  console.log( event.isPropagationStopped() ); // true
});

Try now

Date:2019-08-29 18:54:53 From:www.Lautturi.com author:Lautturi