jquery go through all the element by class code example
Example 1: jquery foreach
$.each( obj, function( key, value ) {
alert( key + ": " + value );
});
Example 2: javascrip for each element of class
var slides = document.getElementsByClassName("slide");
for (var i = 0; i < slides.length; i++) {
Distribute(slides.item(i));
}