我正在编写
$(this).closest('.comment').find('form').toggle('slow');
,问题是子级中的每个表单都被切换了。我只想切换第一个表单。HTML类似于以下内容,这是一个链接。<div comment>
<a href>
<form>
</form>
<a href>
<div comment>
<form>
</form>
</div>
</div>
:first
选择器,那么自己很容易找到它......http://docs.jquery.com/Main_Page - Tomas Aschan