jquery: change class on click event
<p>I am using jquey for a panel to show and hide. There is a small arrow image on it which also changes on hide and show. My code is </p>

<pre><code>&lt;div class="trigger-m"&gt;&lt;span id="toppanelarrow"&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
</code></pre>

<p>Now a class is added to_up when the panel opens and to_down when the panel closed. I have respective up and down arrow image for this.</p>

<p>Can someone help me adding a jquery on click event of 'toppanelarrow' so a new class gets added to the span.</p>

<p>I have tried <code>$().addClass().removeClass()</code> but this didn't work.</p>

<p>Update: Please find the fiddle implementation <a href="http://jsfiddle.net/B5QUj/4/" rel="nofollow">http://jsfiddle.net/B5QUj/4/</a></p>

<p>Thanks</p>
