javascript - Add Cookie in Bootstrap collapsible sidebar navigation -
my html code:
<div class="collapse navbar-collapse" id="bs-sidebar-navbar-collapse-1"> <div id="sidebar-wrapper"> <ul class="sidebar-nav navbar-nav" id="sidebar"> <li class="dropdown"><a href="#" class="dropdown-toggle brd-top" data-toggle="dropdown" aria-expanded="false" title="eai system">eai system<i class="fa fa-desktop sub_icon"></i></a> <ul class="dropdown-menu foranimate relative" role="menu"> <li><a href="#" title="service catalog">service catalog<i class="fa fa-cogs sub_icon"></i></a></li> <li><a href="#" title="environment">environment<i class="fa fa-cloud sub_icon"></i></a></li> <li><a href="#" title="onboarding checklist">onboarding checklist<i class="fa fa-list-alt sub_icon"></i></a></li> <li><a href="#" title="active userlist">active userlist<i class="fa fa-user sub_icon"></i></a></li> </ul> </li> <li class="dropdown"><a href="#" class="dropdown-toggle brd-top" data-toggle="dropdown" aria-expanded="false" title="eai troubleshooting">eai troubleshooting<i class="fa fa-exclamation-circle sub_icon"></i></a> <ul class="dropdown-menu foranimate relative" role="menu"> <li><a href="dashboard.html" title="troubleshooting">troubleshooting<i class="fa fa-exclamation-circle sub_icon"></i></a></li> </ul> </li> <li class="dropdown"><a href="#" class="dropdown-toggle brd-top" data-toggle="dropdown" aria-expanded="false" title="eai deployment">eai deployment<i class="fa fa-share sub_icon"></i></a> <ul class="dropdown-menu foranimate relative" role="menu"> <li><a href="#" title="deployment log">deployment log<i class="fa fa-check-square-o sub_icon"></i></a></li> <li><a href="#" title="test results">test results<i class="fa fa-server sub_icon"></i></a></li> </ul> </li> <li class="dropdown"><a href="#" class="dropdown-toggle brd-top" data-toggle="dropdown" aria-expanded="false" title="eai reports">eai reports<i class="fa fa-line-chart sub_icon"></i></a> <ul class="dropdown-menu foranimate relative" role="menu"> <li><a href="#" title="reports">reports<i class="fa fa-line-chart sub_icon"></i></a></li> </ul> </li> </ul> </div> </div>
this bootstrap menu in master page. problem when click on collapse , click on link. next page open open collapse panel.
despite it's not preferred use jquery in angular, stated in docs can use:
$('#bs-sidebar-navbar-collapse-1').collapse('hide')
to hide collapsed menu. can in new view controller on load.
Comments
Post a Comment