control-freak-ide/Control-Freak-Documentation/jQuery/docs/entries/event.stopPropagation.json
plastic-hub-dev-node-saturn 538369cff7 latest
2021-05-12 18:35:18 +02:00

1 line
916 B
JSON

{"name":"event.stopPropagation","type":"method","title":"event.stopPropagation()","deprecated":null,"removed":null,"desc":"Prevents the event from bubbling up the DOM tree, preventing any parent handlers from being notified of the event.","categories":["events/event-object","version/1.0"],"entries":[{"return":"","signatures":{"added":"1.0"},"examples":{"desc":"Kill the bubbling on the click event.","code":"\n$( \"p\" ).click(function( event ) {\n event.stopPropagation();\n // Do something\n});\n"},"longdesc":"\n <p>We can use <code><a href=\"/event.isPropagationStopped/\">event.isPropagationStopped()</a></code> to determine if this method was ever called (on that event object). </p>\n <p>This method works for custom events triggered with <a href=\"/trigger/\">trigger()</a>, as well.</p>\n <p>Note that this will not prevent other handlers <em>on the same element</em> from running. </p>\n "}]}