I am trying to validate a text input when it loses focus. I would like to know which row of the table it is in. This is what I have so far and it keeps coming back as unde
rowIndex is a DOM property, not a jQuery method, so you have to call it on the underlying DOM object:
tableRow[0].rowIndex
or just:
var row= this.parentNode.parentNode;
alert(row.rowIndex);
since you aren't really using jQuery for much there.
In jQuery 1.4 there is $(row).index(), but it scans siblings to find out which child element number it is in its parent. This is slower and will return a different result to rowIndex in the case where you have multiple s.