SyntaxFix
Write A Post
Hire A Developer
Questions
This is the safer way:
var elements = document.getElementsByClassName("myclass"); for (var i = 0; i < elements.length; i++) myFunction(elements[i]);