Created
March 26, 2011 20:39
-
-
Save zetter/888613 to your computer and use it in GitHub Desktop.
jquery extension to register click events that won't bubble. Call instead of click(func).
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
jQuery.fn.preventDefaultClick = function(f) { | |
this.click(function(e){ | |
f.call(this, e); | |
e.preventDefault(); | |
}); | |
return this; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment