I am trying for the life of me to figure out how to get it to remove a class when clicking another link. I want it so it only highlights the specific area selected but the remove class isn't removing the class. So it stays highlighted as specified in the class underNavselected. Can anyone assist?
This is all on one page, not linking to other docs. I am hiding and unhiding content with each click.
jQuery(document).ready(function() {
jQuery(".toTop").hide();
jQuery(".aboutHeader").hide();
jQuery(".LAM").hide();
jQuery(".WID").hide();
jQuery(".MyG").hide();
jQuery("#LAMlink").live("click", function()
{
jQuery(this).addClass("underNavselected");
jQuery(".LAM").slideToggle(500);
jQuery(".WID").hide();
jQuery(".MyG").hide();
jQuery("#MyGlink", "#WIDlink").removeClass("underNavselected");
});
jQuery("#WIDlink").live("click", function()
{
jQuery(this).addClass("underNavselected");
jQuery(".WID").slideToggle(500);
jQuery(".LAM").hide();
jQuery(".MyG").hide();
jQuery("#LAMlink", "#MyGlink").removeClass("underNavselected");
});
jQuery("#MyGlink").live("click", function()
{
jQuery(this).addClass("underNavselected");
jQuery(".MyG").slideToggle(500);
jQuery(".LAM").hide();
jQuery(".WID").hide();
jQuery("#LAMlink", "#WIDlink").removeClass("underNavselected");
});
});