Adding and Removing an active class
<p>I know this should be simple and has been covered a million times already but I just can;t seem to get it to work.</p>

<p>It's your basic script that makes the last link you clicked in a list become the 'active' link my adding the 'active' class to it.</p>

<p>HTML</p>

<pre><code>&lt;ul id="projectsList"&gt;
            &lt;li&gt;&lt;a href="#" class="activeProject" id="portoftyne"&gt;Port of Tyne&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="#" id="eaga"&gt;Eaga&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="#" id="gong"&gt;Gong&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="#" id="nufc"&gt;NUFC&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
</code></pre>

<p>jQuery</p>

<pre><code>    $(document).ready(function() {
    $('#projectsList a').click(function(){
         $('.activeProject').removeClass('activeProject')
         $(this).addClass("activeProject");
    });
});
</code></pre>

<p>Should work, doesn't at all.</p>

<p><strong>EDIT</strong> Nothing wrong with this code, it works fine. There was a section of code above it in the document that was preventing it from working.</p>
