Yea, i just thought about the .each thing about 15mins ago and it worked perfect. Thanks for the replies.
Bohdan Ganicky wrote: > > > Hi Eridius, > > I guess this could do it: > > $('#' + self.options.auto_complete_id + ' li').each(function(i) { > // i is now an index > $(this).bind('mouseover', function() { > //do something on mouseover > }); > }); > > -- > Bohdan Ganicky > > On Feb 5, 2:15 pm, 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. > > -- View this message in context: http://www.nabble.com/getting-element-number--tp15289891s27240p15292916.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.