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

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -