eq() method question
<p>For example, I have this HTML structure:</p>

<pre><code>&lt;ul&gt;
    &lt;li&gt;&lt;a class="ac_list_a"&gt;some text&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a class="ac_list_a"&gt;some text&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a class="ac_list_a"&gt;some text&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a class="ac_list_a ac_current_a"&gt;some text&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a class="ac_list_a"&gt;some text&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a class="ac_list_a"&gt;some text&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>I need to get the next or previous <code>ac_list_a</code> from <code>ac_current_a</code>.</p>

<p>I have tried to do like this:</p>

<pre><code>var all_a = $('.ac_list_a,.ac_current_a').eq('.ac_current_a').next();
</code></pre>

<p>But it doesn't work.</p>

<p>How would you solve it?</p>

<p><strong>Update</strong></p>

<p>That is, of course I can do it the dumb way, by assigning class to all <code>li</code> elemnts, then using </p>

<pre><code>parents(class).next().find(a.class)
</code></pre>

<p>But is it possible to do it more dynamic way? Because the structure of HTML could change in the future.</p>
