[jQuery] Re: How to return element index in group

2008-11-04 Thread ienes
Okay, that works. Thanks very much. On 4 Lis, 13:34, Klaus Hartl <[EMAIL PROTECTED]> wrote: > Did you have a look at the index method in the > documentation?http://docs.jquery.com/Core/index#subject > > So: > > var li = $('li').click(function() { >     alert(li.index(this)); > > }); > > --Klaus

[jQuery] Re: How to return element index in group

2008-11-04 Thread Klaus Hartl
Did you have a look at the index method in the documentation? http://docs.jquery.com/Core/index#subject So: var li = $('li').click(function() { alert(li.index(this)); }); --Klaus On 4 Nov., 12:44, ienes <[EMAIL PROTECTED]> wrote: > Hello there, > > Imagine we have an unordered list and I