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
You are trying to use the DOM Core attribute on the jQuery object. Try this:
alert(tableRow[0].rowIndex);
@jandreas: from the W3C docs:
rowIndex of type long, readonly, modified in DOM Level 2
This is in logical order and not in document order. The rowIndex does take into account sections (THEAD, TFOOT, or TBODY) within the table, placing THEAD rows first in the index, followed by TBODY rows, followed by TFOOT rows.
.index()
would not take those THEAD etc. into account.