Good morning. I have the following menu:
<ul>
<li class="active"><a href="?type=0">Ranking PvP</a></li>
<li><a href="?type=2">Ranking Clãs</a></li>
<li><a href="?type=1">Ranking Guilds</a></li>
</ul>
Where'class="active" defines a different color for which flap is open. I would like the user to choose the Clan Ranking for example, change the class from the pvp menu to none and the clan to active. I tried the following but did not succeed:
<script>
$("#li2").click(function(){
$("li1").removeClass("active");
$("li2").addClass("active");
});
</script>
<ul>
<li id="l1" class="active"><a href="?type=0">Ranking PvP</a></li>
<li id="l2"><a href="?type=2">Ranking Clãs</a></li>
<li id="l3"><a href="?type=1">Ranking Guilds</a></li>
</ul>