Created
October 23, 2012 10:03
-
-
Save pazguille/3937995 to your computer and use it in GitHub Desktop.
Event Delegation
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
document.addEventListener('click', function (event) { | |
event = event || window.event; | |
var target = event.target || event.srcElement; | |
console.log(target); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment