Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
jquery extension to register click events that won't bubble. Call instead of click(func).
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
You can’t perform that action at this time.