Cancelling event propagation with jQuery
Within an event handler, there are no less than 4 methods to cancel event propagation, each with different semantics.
Only prevents the default browser behavior for the click, i.e. going to a different url or submitting a form.
Only prevents the event from bubbling up the DOM. Note this effectively also cancels any event handlers attached through jQuery's
livemethod, since those depend on bubbling.
Prevents the event from bubbling up the DOM.
Additionally prevents any further event handlers bound on the same element.
falsein the event handler
The same as
stopPropagation. Will not prevent event handlers bound on the element itself.