Skip to content

Instantly share code, notes, and snippets.

@thetallweeks
Created January 17, 2014 20:26
Show Gist options
  • Save thetallweeks/8480779 to your computer and use it in GitHub Desktop.
Save thetallweeks/8480779 to your computer and use it in GitHub Desktop.
After document.getElementsByClassName, loop through the list of elements.
for (var i = 0, j = $elements.length; i < j; i++) {
element = elements[i];
// Bind events, do whatever here
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment