【发布时间】:2011-02-05 02:15:58
【问题描述】:
我有一些可怕的代码需要处理
...
<div class="container">
...
<tr>
<td width="100" height="50">
<a class="swaps"><img src="http://www.blah.jpg" alt="Some Title" id="1"></a></span></td>
</tr>
<tr>
<td width="100" height="50">
<a class="swaps"><img src="http://www.blah2.jpg" alt="Another title" id="2"></a></span></td>
</tr>
</div>
如果我使用
var thisone = $("#container .swaps:first")
要选择第一个(id 为 1)为什么我无法选择
thisone.next()?
【问题讨论】:
-
当您致电
thisone.next()时,您是否正在寻找下一个<a class="swaps"..? -
是的。它的问题是我需要获取下一个以便我可以迭代(以便下一个成为当前的,下一个成为下一个,等等......)