Skip to content

Instantly share code, notes, and snippets.

@matthewkremer
Created August 10, 2012 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthewkremer/3314482 to your computer and use it in GitHub Desktop.
Save matthewkremer/3314482 to your computer and use it in GitHub Desktop.
Cross Browser Cancel Event Propagation
function cancelEvent(e){
if(e !== null){
e = e || window.event;
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment