Change background image of <li> on click of <a> tag
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'); }); }); Problem : When I click on first link its background image is changed, but again next time when I click on other