Skip to content

Instantly share code, notes, and snippets.

@lionelB
Last active December 16, 2015 20:49
Show Gist options
  • Save lionelB/5495275 to your computer and use it in GitHub Desktop.
Save lionelB/5495275 to your computer and use it in GitHub Desktop.
var rows = document.getElementsByClassName('row');
[].forEach.call( rows, function(row, i){
if(i%2) {
row.addEventListener("click", function(event) {
alert('Je suis la ligne numéro' + i);
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment