我得到以下代码:
<table border=1>
<tbody>
<tr>
<td>issue</td>
<td><a class="issueDrawer" href="#">view</a></td>
<td>description</td>
</tr>
<tr class="issueDrawer" style="display: none;"><td colspan="100%">boom!</td></tr>
<tr>
<td>issue</td>
<td><a class="issueDrawer" href="#">view</a></td>
<td>description</td>
</tr>
<tr class="issueDrawer" style="display: none;"><td colspan="100%">boom!</td></tr>
<tr>
<td>issue</td>
<td><a class="issueDrawer" href="#">view</a></td>
<td>description</td>
</tr>
<tr class="issueDrawer" style="display: none;"><td colspan="100%">boom!</td></tr>
</tbody>
</table>
基本上我正在对“a.issueDrawer”执行一个动作,它应该为“tr.issueDrawer”设置动画。从“a.issueDrawer”我目前正在做$(this).parent().parent().next(),但必须有一种更简洁的方法来遍历并找到第一个“tr.issueDrawer”。
想法?