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.
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.
HTML
<ul id="projectsList">
<li><a href="#" class="activeProject" id="portoftyne">Port of Tyne</a></li>
<li><a href="#" id="eaga">Eaga</a></li>
<li><a href="#" id="gong">Gong</a></li>
<li><a href="#" id="nufc">NUFC</a></li>
</ul>
jQuery
$(document).ready(function() {
$('#projectsList a').click(function(){
$('.activeProject').removeClass('activeProject')
$(this).addClass("activeProject");
});
});
Should work, doesn't at all.
EDIT 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.