I want the next ‘a’ element of current ‘a’. When current is 2,3,4 I catch 3,4,5 with a $(‘a.current’).nextAll(‘a’) but when current is 5 i can’t catch the next ‘a’.
If someones has the solution…
<div id="slides">
<ul>
<li>
<a href="" class='current'>2</a>
<a href="" >3</a>
<a href="" >4</a>
<a href="" >5</a>
</li>
<li>
<a href="" >6</a>
<a href="" >7</a>
<a href="" >8</a>
<a href="" >9</a>
</li>
</ul>
</div>
live demo: http://jsfiddle.net/eaXdc/
If you only wanted the next one, change this:
to this: