I have something like this...
$( \'ul li\' ).each( function( index ) { $( this ).append( \',\' ); } );
I need to know what index will b
using jQuery .last();
$("a").each(function(i){ if( $("a").last().index() == i) alert("finish"); })
DEMO