Skip to content

Instantly share code, notes, and snippets.

@mattpat
Created October 2, 2011 21:40
Show Gist options
  • Save mattpat/1258002 to your computer and use it in GitHub Desktop.
Save mattpat/1258002 to your computer and use it in GitHub Desktop.
Original
for (var i = 0; i < 10; i++){
elements[i].addEventListener('click', function(){
alert(i);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment