javascript - How to hide drop-down menu in Bootstrap 3.3.4 dynamically using jQuery in document-ready function? -
i've following bootstrap html code :
<nav class="navbar navbar-inverse"> <div class="container-fluid"> <div class="navbar-header"> <ul class="nav navbar-nav"> <li class="projects" class="dropdown"><a class="dropdown-toggle projects" data-toggle="dropdown" href="#"><span class="projects">projects</span></a> <ul class="dropdown-menu"> <li><a href="/prj/pages/project/projectlist.html">list</a></li> <li><a href="/prj/pages/project/createnewproject.html">add new project</a></li> </ul> </li> </ul> </div> </div> </nav>
now want hide drop-down menu using jquery code i.e. want hide drop-down menus list , add new project.
i want done in document-ready function. can add specific ids suitable tag make thing work.
thanks.
$( document ).ready(function() { $("ul.dropdown-menu").children().hide(); });
Comments
Post a Comment