javascript - html bootstrap dropdown menu getting reset -


i have dropdown menu in 'index.html` like

<div id="navbar" class="navbar-collapse collapse">   <form class="navbar-form navbar-right">         <div class="dropdown">           <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">menu           <span class="caret"></span></button>           <ul class="dropdown-menu">             <li><a href="{% url 'item1' %}">item1</a></li>             <li><a href="{% url 'item2' %}">item2</a></li>           </ul>         </div>   </form> </div><!--/.navbar-collapse --> 

and when click on item2 dropdown menu brifely sets item2 , menu. in item2.html calling index.html like

{% extends 'index.html' %} {% block content %} ... {% endblock %} 

i think after clicking on item2 href rightly calls item2.html calls index.html when renders dropdown menu again value menu, how can keep dropdown value set selected one?


Comments

Popular posts from this blog

cookies - Yii2 Advanced - Share session between frontend and mainsite (duplicate of frontend for www) -

angular - password and confirm password field validation angular2 reactive forms -

php - Permission denied. Laravel linux server -