How to maintain a pointer for a list item [jquery]
<p>I'm trying to enable keyboard control (arrow up/down)</p>

<p>I've my jquery codes as</p>

<pre><code>if($('.yumnak').hasClass('itemCur')) {
    var pntr = $('.yumnak').hasClass('itemCur');
    pntr.next().addClass('itemCur');
    pntr.next().removeClass('item');
    pntr.removeClass('itemCur');
    pntr.addClass('item');
}
</code></pre>

<p>and the markup as</p>

<pre><code>&lt;ul&gt;
  &lt;li class="yumnak itemCur"&gt;&lt;a href="#"&gt;one&lt;/a&gt;&lt;/li&gt;
  &lt;li class="yumnak item"&gt;&lt;a href="#"&gt;two&lt;/a&gt;&lt;/li&gt;
  &lt;li class="yumnak item"&gt;&lt;a href="#"&gt;three&lt;/a&gt;&lt;/li&gt;
  &lt;li class="yumnak item"&gt;&lt;a href="#"&gt;four&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>Here, won't my <code>pntr</code> not work?? It seems it's not working. How do I maintain a pointer??</p>
