event.isPropagationStopped()

event.isPropagationStopped() Returns: Boolean

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

  • version added: 1.3event.isPropagationStopped()

Example:

Checks whether event.stopPropagation() was called

<!DOCTYPE html>
<html>
<head>
  <script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
	
<script>$("p").click(function(event){
  alert( event.isPropagationStopped() );
  event.stopPropagation();
  alert( event.isPropagationStopped() );
});  </script>
</body>
</html>

Demo:

Result: