jQuery's next() on elements not next to each other
Posted
by Rio
on Stack Overflow
See other posts from Stack Overflow
or by Rio
Published on 2010-04-07T03:06:40Z
Indexed on
2010/04/07
3:13 UTC
Read the original article
Hit count: 441
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()
?
© Stack Overflow or respective owner