jquery sloop selected elements code example
Example 1: jquery loop through li elements
//looping through list elements in jquery
$('#myUlID li').each(function() {
console.log($(this));
})
Example 2: jquery iterate obj
$( "li" ).each( function( index, element ){
console.log( $( this ).text() );
});
// Logs the following:
// Link 1
// Link 2
// Link 3