jQuery API

event.isImmediatePropagationStopped()

event.isImmediatePropagationStopped() Returns: Boolean

Description: Returns whether event.stopImmediatePropagation() was ever called on this event object.

  • version added: 1.3event.isImmediatePropagationStopped()

This property was introduced in DOM level 3.

Example:

Checks whether event.stopImmediatePropagation() was called.

<!DOCTYPE html>
<html>
<head>
  <script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
  
  <button>click me</button>
  <div id="stop-log"></div>
  
<script>

function immediatePropStopped(e) {
  var msg = "";
  if ( e.isImmediatePropagationStopped() ) {
    msg =  "called"
  } else {
    msg = "not called";
  }
  $("#stop-log").append( "<div>" + msg + "</div>" );
}

$("button").click(function(event) {
  immediatePropStopped(event);
  event.stopImmediatePropagation();
  immediatePropStopped(event);
});  
</script>

</body>
</html>

Demo:

Support and Contributions

Need help with event.isImmediatePropagationStopped() or have a question about it? Visit the jQuery Forum or the #jquery channel on irc.freenode.net.

Think you've discovered a jQuery bug related to event.isImmediatePropagationStopped()? Report it to the jQuery core team.

Found a problem with this documentation? Report it on the GitHub issue tracker

  • adam1920

    Hi
    This example not working. Please, insert “p” tag in the body.

  • http://pulse.yahoo.com/_SHHG5WYPBBOICLV6RVTLZ2ZPFA Felipe

    It seems this method is no longer in the W3C DOM Level 3 specification.
    http://www.w3.org/TR/DOM-Level…/