我有很多表,比如
<table class="mytable">
<tr class = "first_tr">
<td></td>
<td></td>
<td></td>
</tr>
<tr class = "second_tr">
<td></td>
<td></td>
<td></td>
</tr>
<tr class = "third_tr">
<td></td>
<td></td>
<td></td>
</tr>
</table>
<table class="mytable">
<tr class = "first_tr">
<td></td>
<td></td>
<td></td>
</tr>
<tr class = "second_tr">
<td></td>
<td></td>
<td></td>
</tr>
<tr class = "third_tr">
<td></td>
<td></td>
<td></td>
</tr>
</table>
我可能有10多个这样的表
我需要隐藏除第一个表之外的所有表的第一行(类名 first_tr
)
最佳答案
试试这个:
$('td:nth-child(2):not(:first)').hide();
Demo here
关于我使用的更多信息:
- > :nth-child()
- > :not()
- > :first
关于javascript - 查询 : Hide first row of all the tables except first table,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19206102/