tadam logo
Did you find an error in the text?
Select this with mouse and press
Ctrl + Enter
Xhtml.co.il Check Spelling
Orphus system

event.isImmediatePropagationStopped()

event.isImmediatePropagationStopped()

Returns: Boolean

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

event.isImmediatePropagationStopped()

version added: 1.3

This property was introduced in DOM level 3.

Example

Checks whether event.stopImmediatePropagation() was called.
$("p").click(function(event){
  alert( event.isImmediatePropagationStopped() );
  event.stopImmediatePropagation();
  alert( event.isImmediatePropagationStopped() );
});  
The output of the code above will be:

Full source

Checks whether event.stopImmediatePropagation() was called.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
                    "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
  
  <script type="text/javascript" language="javascript">
  $(document).ready(function(){
  $("p").click(function(event){
    alert( event.isImmediatePropagationStopped() );
    event.stopImmediatePropagation();
    alert( event.isImmediatePropagationStopped() );
    });
  });
  </script>

</head>
<body>
<p>Click me</p>
</body>
</html>
Was this information helpful?
   

Comments