loop over all the class elements jquery code example
Example 1: javascrip for each element of class
var slides = document.getElementsByClassName("slide");
for (var i = 0; i < slides.length; i++) {
Distribute(slides.item(i));
}
Example 2: foreach jquery
$( "li" ).each(function( index ) {
console.log( index + ": " + $( this ).text() );
});