我有这个 html 标记,我想使用 jQuery 选择一些行。
当按下“cerrar”类的按钮时,我想在同一个按钮之前选择“隐藏”类的 3 tr
<tr class='main'>
<td class='table-sub-title'>
Test
</td>
<td class='table-sub-title'>
Test
</td>
<td class='table-sub-title'>
Test
</td>
<td class='table-sub-title'>
Test
</td>
</tr>
<tr class='hidden'> <!-- ********* Select this <tr> ********* -->
<td class='noborder'>
Test
</td>
<td class='noborder'>
Test
</td>
<td class='noborder'>
Test
</td>
<td class='noborder'>
Test
</td>
</tr>
<tr class='hidden'> <!-- ********* Select this <tr> ********* -->
<td class='noborder'>
Test
</td>
<td class='noborder'>
Test
</td>
<td class='noborder'>
Test
</td>
</tr>
<tr class='hidden'> <!-- ********* Select this <tr> ********* -->
<td class='noborder'>
Test
</td>
<td class='noborder'>
Test
</td>
<td class='noborder'>
</td>
<td class='noborder'>
<input type='button' name='Cancelar' value='Cancelar' class='cerrar' />
</td>
</tr>
<tr class='main'>...
<!-- Repeat -->