Here is what I am trying to do
$("table:nth-of-type(1) > tr:not(tr:nth-of-type(1))").hide();
Anyone knows why jQuery does not support such a way of selection?
Here is what I am trying to do
$("table:nth-of-type(1) > tr:not(tr:nth-of-type(1))").hide();
Anyone knows why jQuery does not support such a way of selection?
That's because the rows are not children of the table, they are children of the tbody
:
$("table:nth-of-type(1) > tbody > tr:not(tr:nth-of-type(1))").hide();
Even if you don't have a tbody
tag in the HTML, a tbody
element is created for the tr
tags that are directly in the table.
. |