jQuery to select an item from a list?
<p>I have a menu list something like this:</p>

<pre><code>&lt;ul class="submenuList"&gt; 
  &lt;li&gt;&lt;a onclick="loadItem('Blue%20Orchid%20Press')" id="Blue%20Orchid%20Press"&gt;class="on"&gt;Blue Orchid Press&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a onclick="loadItem('Brilliant%20Telecommunications')" id="Brilliant%20Telecommunications" class="off"&gt;Brilliant Telecommunications&lt;/a&gt;&lt;/li&gt; 
  &lt;li&gt;&lt;a onclick="loadItem('CBT%20Systems%201')" id="CBT%20Systems%201" class="off"&gt;CBT Systems 1&lt;/a&gt;&lt;/li&gt; 
 &lt;/ul&gt;
</code></pre>

<p>A currently selected list item has a class = "on". What I want to do is to find the next item in the list after the currently selected one, and set it's class to "on" and trigger it's "onclick", and set the current one to "off".</p>

<p>Any help appreciated!</p>

<p>update:</p>

<pre><code>&lt;div id="menu"&gt;
    &lt;div id="main_menu" style="display: block;"&gt;&lt;ul&gt;&lt;li&gt;&lt;a onclick="loadSubMenu('f')" id="f" class="off"&gt;featured&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a onclick="loadSubMenu('a')" id="a" class="off"&gt;advertising&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a onclick="loadSubMenu('p')" id="p" class="on"&gt;print&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a onclick="loadSubMenu('w')" id="w" class="off"&gt;web&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;
    &lt;br clear="all"&gt;&lt;hr&gt;&lt;br clear="all"&gt;
    &lt;div id="sub_menu" style="display: block;"&gt;&lt;ul class="submenuList"&gt;&lt;li&gt;&lt;a onclick="loadItem('Blue%20Orchid%20Press')" id="Blue%20Orchid%20Press" class="on"&gt;Blue Orchid Press&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a onclick="loadItem('Brilliant%20Telecommunications')" id="Brilliant%20Telecommunications" class="off"&gt;Brilliant Telecommunications&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a onclick="loadItem('CBT%20Systems%201')" id="CBT%20Systems%201" class="off"&gt;CBT Systems 1&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a onclick="loadItem('CBT%20Systems%202')" id="CBT%20Systems%202" class="off"&gt;CBT Systems 2&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;
  &lt;/div&gt;
</code></pre>
