Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

36 lines (36 sloc) 1.761 kb
<?xml version="1.0"?>
<entry type="method" name="event.stopImmediatePropagation" return="">
<desc> Keeps the rest of the handlers from being executed and prevents the event from bubbling up the DOM tree.</desc>
<p>In addition to keeping any additional handlers on an element from being executed, this method also stops the bubbling by implicitly calling <code>event.stopPropagation()</code>. To simply prevent the event from bubbling to ancestor elements but allow other event handlers to execute on the same element, we can use <code><a href="">event.stopPropagation()</a></code> instead.</p>
<p>Use <code><a href="">event.isImmediatePropagationStopped()</a></code> to know whether this method was ever called (on that event object).</p>
<note id="propagation-for-live-or-delegate" type="additional"/>
<desc>Prevents other event handlers from being called.</desc>
p { height: 30px; width: 150px; background-color: #ccf; }
div {height: 30px; width: 150px; background-color: #cfc; }
// This function won't be executed
$(this).css("background-color", "#f00");
$("div").click(function(event) {
// This function will be executed
$(this).css("background-color", "#f00");
<category slug="events/event-object"/>
<category slug="version/1.3"/>
Jump to Line
Something went wrong with that request. Please try again.