jquery loop in all elements of class code example
Example 1: jquery loop through each child element
$('#mydiv').children('input').each(function () {
alert(this.value); // "this" is the current element in the loop
});
Example 2: jquery loop over elements
$( "li" ).each(function( index ) {
console.log( index + ": " + $( this ).text() );
});