html:
- CO
- <
Create a class for what you wish the active li
tag to look like; and use the following:
$('li').click(function(){
$(this).addClass('active').siblings().removeClass('active');
});
This should affect only list items within the same ul
tag.
Try this
$("li").click(function(){
$("li").removeClass("active");
$(this).addClass("active");
});
CSS for the new active class is
li.active {
background-image: url(../images/btnSelectedTab.png);
color: black;
}