0

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?

BoltClock
  • 665,005
  • 155
  • 1,345
  • 1,328

1 Answers1

1

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.

Guffa
  • 666,277
  • 106
  • 705
  • 986