Last active
August 29, 2015 14:03
-
-
Save marsen/77d0cad39fe42cf5bc55 to your computer and use it in GitHub Desktop.
Stop Event Bubble
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
function stopEventBubble(e) { | |
if (e && e.stopPropagation) { | |
e.stopPropagation(); | |
} | |
else {//why always IE | |
window.event.cancelBubble = true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment