jQuery's next() on elements not next to each other
- by Rio
I have bits of horrible code I have to deal with
...
<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>
If I use
var thisone = $("#container .swaps:first")
to select the first one (with id 1) why do I have trouble selecting
thisone.next()?