javascript loop through class elements
snippet in javascript

javascript loop through class elements

user4628

var els = document.getElementsByClassName("myClass");
for(var i = 0; i < els.length; i++)
{
  console.log(els[i]);
}