I want use react.js with bootstrap in my asp.net mvc project.
I need my menu items to change "active"
property when you click on corresponding <li>
element
Here is what I have:
<body>
<div class="container">
<ul class="nav nav-tabs" role="tablist">
<li class="active">@Html.ActionLink("Home", "Index", "Home")</li>
<li>@Html.ActionLink("Log in", "Index", "Login")</li>
<li>@Html.ActionLink("Predict", "Index", "Prediction")</li>
</ul>
</div>
</body>
Is there a build in functionality for that or I need to hardcode in javascript onClick
event and change class
of element to "active"
by hand?