index value of each element in jquery code example
Example 1: jquery each get index
$( "li" ).each(function( index ) {
console.log( index + ": " + $( this ).text() );
});
Example 2: jquery index of element
$("#wizard li").click(function () {
console.log( $(this).index() );
});