John Resig schrieb: > You want the index() function: > > var item = $("li.selected")[0]; > var position = $("li").index( item );
What about scoping the first query: var lis = $('li'); var position = lis.index( $('.selected', lis)[0] ); -- Klaus _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/