I am new using jQuery, and I am trying to hide rows from a table like that:
<table border="1" width="100%" id="table1">
<tr>
<td style="text-align: center">
First Row
</td>
</tr>
<tr>
<td style="text-align: center">
Second row
</td>
</tr>
<tr>
<td style="text-align: center">
Thrid row
</td>
</tr>
</table>
I am trying to hide the first and the 3erd row from table, how can I do it? I am trying but I cannot achieve my goal with this code:
$('#table1 tr').hide()
$('#table1 tr:first(), #table1 tr:eq(2)').hide(), or ` #table1 tr:last()` if it's always going to be the last row.