event.stopImmediatePropagation() does two things: it skips any remaining handlers on the same element, and it stops bubbling (implicitly calls stopPropagation()). Takes no arguments, returns undefined. Since jQuery 1.3. Check with isImmediatePropagationStopped().
Syntax
Start with these common calls. Keep them short and readable.
jQuery
event.stopImmediatePropagation() // no args
// Same element: remaining handlers are skipped
// Ancestors: bubbling is stopped (like stopPropagation)
// Need other same-element handlers to still run?
// → use stopPropagation() instead
Call
What it does
event argument
jQuery event object
stopImmediatePropagation()
Skip remaining + stop bubble
Handler order
Only handlers after the call are skipped
preventDefault()
Separate — cancels browser default
Load jQuery before your script (CDN or local file), then wrap DOM work in $(function () { ... }) when needed.
Parameters
Parameter
Description
Step 1
Bind more than one handler on the same element (or expect parent handlers).
Step 2
In the handler that should win, call event.stopImmediatePropagation().
Step 3
Any later handlers on that element will not run.
Return Value
Return Value
Description
Boolean
Often true or false depending on the match or state.
Value / undefined
Getters usually return a value from the first matched element, or undefined when nothing applies.
jQuery Examples
Example 1 — Official Demo: Skip Second Handler
First p handler stops immediate; second never runs; div still works.
jQuery
$("p").on("click", function (event) {
event.stopImmediatePropagation();
$("#out").append("p handler 1 ran — immediate stopped\n");
});
$("p").on("click", function () {
$("#out").append("p handler 2 ran (skipped)\n");
});
$("div").on("click", function () {
$("#out").append("div handler ran\n");
});
A1 (stopPropagation)
A2 still ran
B1 (stopImmediate)
How It Works
Button A.stopPropagation — A2 still runs.
Button B.stopImmediatePropagation — B2 is skipped.
Difference. Immediate also kills the same-element queue.
Frequently Asked Questions
It keeps any remaining handlers on the same element from running and prevents the event from bubbling up the DOM. It implicitly calls stopPropagation(). Takes no arguments and returns undefined. Available since jQuery 1.3.
When an early handler must halt the handler queue on that element — for example, validation that should block later save/analytics handlers on the same button.
stopPropagation() stops bubbling to parents but other handlers on the same element still run. stopImmediatePropagation() stops both remaining same-element handlers and bubbling.
No. In jQuery, return false calls preventDefault() and stopPropagation(), not stopImmediatePropagation(). Remaining same-element handlers may still run.
Use event.isImmediatePropagationStopped(). It returns true if stopImmediatePropagation() was called on this event object during the current dispatch.
No. It only affects handler execution and bubbling. To cancel link navigation or form submit, call event.preventDefault() separately.