Skip to content

Instantly share code, notes, and snippets.

@llkats
Created September 21, 2011 19:43
Show Gist options
  • Save llkats/1233082 to your computer and use it in GitHub Desktop.
Save llkats/1233082 to your computer and use it in GitHub Desktop.
preventDefault for modern browsers and IE
var genericHandler = function(evt) {
evt.preventDefault ? evt.preventDefault() : evt.returnValue = false;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment