<ul class="ullist" id="navlist"> <li id="list1"><a id="a1" runat="server" >Active</a></li> <li id="list2"><a id="a2" runat="server" >Abeyance</a></li> </ul>
$(document).ready(function () { $("a").click(function () { $("li.active1").removeClass("active1"); $(this).parent('li').addClass('active1'); return false; }); });
var value="list1"; $('#' + value).addclass('active'); // this is the right way when you have dynamic ID.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)