Cancelling event propagation
Within an event handler, there are multiple 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, so you don't also need to call
falsein the event handler
This only exists for jQuery event handlers, but not for native listeners registered with
The same as
stopPropagation. Will not prevent event handlers bound on the element itself.