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