Hello! Achieved 30 minutes of trying to remove and add an active class for links. It seems the code is correct, but I do not switch to other views by clicking on links in the list ... what to do?
HTML
<div class="navbar-collapse collapse" id="selectBackground"> <ul class="nav navbar-nav"> <li>@Html.ActionLink("Домашняя страница", "Index", "Home")</li> <li>@Html.ActionLink("О программе", "About", "Home")</li> <li>@Html.ActionLink("Контакт", "Contact", "Home")</li> </ul> </div> Js
$("#selectBackground").click(function (e) { e.preventDefault(); $("#selectBackground").removeClass('active'); $(this).addClass('active'); }) Why these 5 lines do not work? The effect is by pressing, but I can not go to the submission: Index, About and Contact.


