Home >>jQuery Tutorial >jQuery event.isImmediatePropagationStopped() Method

jQuery event.isImmediatePropagationStopped() Method

jQuery event.isImmediatePropagationStopped() Method

jQuery event.isImmediatePropagationStopped() Method is used to verify whether the event.stopImmediatePropagation() has been called for the event and returns true if event.stopImmediatePropagation() is called, and false if not.

Syntax:
event.isImmediatePropagationStopped()

Parameter Values

Parameter Description
event It is a required parameter and is used to the event parameter comes from the event binding function
Here is an Example of jQuery event.isImmediatePropagationStopped() Method:

<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$(".box").click(function(event){
event.stopImmediatePropagation();
alert("Was event.stopImmediatePropagation() called: " +  event.isImmediatePropagationStopped());
});
});
</script>
</head>
<body>
<div class="box" style="height:80px;width:150px;padding:5px;background-color:lightgreen;">Click me :)</div>
</body>
</html>

Output:
Click me

No Sidebar ads