[jQuery] Re: Detect child number of an element?

2007-10-11 Thread Wizzud
var myRows = $('table#id tr').click(function(){ alert('Row #' + myRows.index(this) + ' clicked'); }); (index is 0-based, ie clicking on the 7th row returns 'Row #6 clicked' in the example above.) On Oct 10, 3:28 pm, RichUncleSkeleton [EMAIL PROTECTED] wrote: Is it possible to detect the

[jQuery] Re: Detect child number of an element?

2007-10-10 Thread Dave Methvin
For example, say I have a table with 10 rows. If I click on the 7th row, is it possible to obtain the number 7 simply? The tr element should have both a rowIndex and a sectionRowIndex; I've never used them but they're documented.