$('div').click(function() { // Will give you the index out of just the DIV tags var index = $(this).parent().find('> ' + this.tagName).index(this);
// Will give you the index out of all siblings var index = $(this).parent().find('> *').index(this); }); Cheers, -Jonathan On Tue, Jul 15, 2008 at 10:57 AM, ml1 <[EMAIL PROTECTED]> wrote: > > Is there an efficient, cross browser jquery way to find a node's > position among it's siblings? > > Ie if I have ten <div> nodes next to each other and the user clicks on > the third one, what's the best way to tell that it's the third one? > > Thanks! >