<ul class="nav"> <li class="LogoStyle"> <a href=@Url.Action("Index", "Home")> <p>Analog Dashboard</p> </a> </li> <li> <a href=@Url.Action("Index", "Home")> <p>Digital Dashboard</p> </a> </li> <li> <a href=@Url.Action("Index", "Home")> <p>Report</p> </a> </li> <li> <a href=@Url.Action("Index", "Home")> <p>Signal</p> </a> </li> </ul>
$(document).ready(function () { var selector = '.nav li'; $(selector).on('click', function () { $(selector).removeClass('LogoStyle'); $(this).addClass('LogoStyle'); }); });
.LogoStyle { color: red; font-weight: 500; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)