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
  • 700,868
  • 160
  • 1,392
  • 1,356

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
  • 687,336
  • 108
  • 737
  • 1,005