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
Post a Comment