Created
January 21, 2014 13:52
-
-
Save jjmu15/8540441 to your computer and use it in GitHub Desktop.
Vanilla js - for each class
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 myObj = document.getElementsByClassName('class'); | |
for (var i = 0; i < myObj.length; ++i) { | |
var item = myObj[i]; | |
item.innerHTML = 'this is value'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment