$('#' + self.options.auto_complete_id + ' li').bind( 'mouseover', function() { $this = this; $(this).parent().children().each( function( i ) { if ( $this == this ) { alert( i + 1 ); } }); });
On Feb 5, 8:15 am, Eridius <[EMAIL PROTECTED]> wrote: > $('#' + self.options.auto_complete_id + ' li').bind('mouseover', function() > { > //code > > }); > > now is there a way i can get the element number of the one my mouse is > currently over? I mean lets say there is 10 li's in that list and my mouse > is over the 4th one, is there a easy way to get the number 3(since > javascript 0 is the first and so on)? > -- > View this message in > context:http://www.nabble.com/getting-element-number--tp15289891s27240p152898... > Sent from the jQuery General Discussion mailing list archive at Nabble.com.