Created
January 20, 2017 09:44
-
-
Save kuznetsovandrey76/39a1fba45c212c32415d000743211ab9 to your computer and use it in GitHub Desktop.
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
var div = document.querySelectorAll('div'), | |
result; | |
for (var i = 0; i < div.length; i++) { | |
result = div[i]; | |
result.addEventListener('click', function() { | |
alert(this.innerHTML); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you!