html:
<ul>
<li id="Co" class="libgc" ><b>CO</b></li>
<li id="NSCO" class="libgc active"><span> <a href="#NSale.php" target="homeFrame" class="aclass">NSale</a></span></li>
</ul>
css:
.libgc {
background-color: #CCC;
padding-top: 5px;
padding-bottom: 5px;
text-align: center;
background-image: url(../images/pcnav.png);
border: 1px solid #CCC;
}
jquery:
$("li").click(function(){
$(this).css('background-image', 'url("images/btnSelectedTab.png")');
$(this).css('color','black');
});
});
Issue: Changing the background image of one link persists even when clicking on another link. How can we reset the background image to its original state when clicking on a different link?