[jQuery] Re: Finding position among siblings

2008-07-15 Thread Jonathan Sharp
$('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,

[jQuery] Re: Finding position among siblings

2008-07-15 Thread Josh Nathanson
Check into the index() method. -- Josh - Original Message - From: "ml1" <[EMAIL PROTECTED]> To: "jQuery (English)" Sent: Tuesday, July 15, 2008 8:57 AM Subject: [jQuery] Finding position among siblings Is there an efficient, cross browser jquery way to find a node's position amon