indexing - jQuery .each() index? -


i using

$('#list option').each(function(){ //do stuff }); 

to loop on options in list. wondering how index of current loop?

as dont want have have var = 0; , inside loop have i++;

$('#list option').each(function(index){   //do stuff   alert(index); }); 

alerts index :)


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -