Is there a way to dynamically change the css class of <li>
elements in an ASP.NET masterpage? For example, if I click on the AboutUs.aspx
link, I want to change <li class="single">
to <li class="active single">
when the page loads.
Any suggestions on how to achieve this?
<div class="nav-collapse">
<ul class="nav nav-pills">
<li class="active single"><a href="Default.aspx">HOME
<i>company home</i>
</a>
</li>
<li class="single"><a href="AboutUs.aspx">About Us
<i>want to say</i>
</a>
</li>