-
-
Save RedWolves/590182 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Did you mean return false? | |
// 'return false' stops the default behavior of the event | |
// and prevents it from bubbling up DOM, which kills | |
// event delegation and may not be what you indented. | |
// Learn how these event methods can fine tune your | |
// event handler functions. | |
$("#clickme").click(function(e) { | |
//Prevent the default click action from firing. | |
e.preventDefault(); | |
//Prevent the event to propagate up the DOM tree | |
e.stopPropagation(); | |
//Kill all default behavior and event propagation. (not recommended) | |
return false; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment