79365642

Date: 2025-01-17 17:40:47
Score: 0.5
Natty:
Report link

Beware of using "#table tr" as the selector, this is not a 100% solution. The "#table tr" selector find all rows within the table element, and makes no distinction between rows in the specified table and rows in an sub-table contained within the cells of the table.

Ideally you might think something like table>tr but that does not work as the DOM structure has a thead, tbody, or tfoot element in between the table and the tr elements.

You could do it something like this: table>tbody>tr,table>thead>tr,table>tfoot>tr but this only works if query keeps the elements it finds in DOM order and not the order it finds them based on the selector ordering. Switching the order to thead, tbody, tfoot might cause them to line up if jQuery does not use DOM ordering for the results.

But as far as i can tell there is no selector in jQuery by rowIndex.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: TexasNeo