Is this the correct jQuery to change the class?
<p>I have a little project I am working on and I am using jQuery. I tried using a little jQuery to change the class to change some css styles when clicked but it does not seem to work.</p>

<p>heres the important html:</p>

<pre><code>&lt;ul id="UInavList"&gt;
        &lt;li class="selectedNav"&gt;&lt;a href="javascript:;"&gt;My Activity&lt;/a&gt;&lt;/li&gt;
        &lt;li &gt;&lt;a href="javascript:;"&gt;My Tests&lt;/a&gt;&lt;/li&gt;
        &lt;li &gt;&lt;a href="javascript:;"&gt;Messaging&lt;/a&gt;&lt;/li&gt;
        &lt;li &gt;&lt;a href="javascript:;"&gt;Search&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
</code></pre>

<p>and heres the javascript:</p>

<pre><code>$('#UInavList li').click( function() {
    $('#UInavList li').removeClass('selectedNav');
    $(this).addClass('selectedNav');
})
</code></pre>

<p>If you want to see all the code go here: <a href="http://jsfiddle.net/chromedude/XXXwL/" rel="nofollow">http://jsfiddle.net/chromedude/XXXwL/</a></p>
