<ul class="items">
<li><a class="navi" href="#0">Item0</a></li>
<li><a class="navi" href="#1">Item1</a></li>
<li><a class="navi active" href="#2">Item2</a></li>
</ul>
<ul class="items">
<li><a class="navi" href="#0">Item0</a></li>
<li><a class="navi" href="#1">Item1</a></li>
<li><a class="navi active" href="#2">Item2</a></li>
</ul>
<ul class="items">
<li><a class="navi" href="#0">Item0</a></li>
<li><a class="navi" href="#1">Item1</a></li>
<li><a class="navi active" href="#2">Item2</a></li>
</ul>
<script type="text/javascript">
$(".items").click(function (e) {
var target = $(e.target);
if (target.hasClass("navi") && !target.hasClass("active")) {
$(this).find(".active").removeClass("active");
target.addClass("active");
e.preventDefault();
}
});
</script>