title: How to make a Bootstrap 3 dropdown menu open by default when it is inside a collapsed navbar
body: <p>I'm trying to make my dropdown menu open by default when my collapsed navbar is opened. <strong>Here is a <a href="http://jsfiddle.net/mp1d2jz7/" rel="noreferrer">fiddle</a> to show my code so far</strong>. </p>
  
  <p>Currently, if you click on the navbar when it's in a collapsed state, two links and a dropdown menu are revealed. You have to click again to open the dropdown menu. </p>
  
  <p>My aim is to make the dropdown menu open by default and hide the <code>a.dropdown-toggle</code> element when the collapsed navbar is opened. A visual of how I'd like it to look when the collapsed navbar is opened:</p>
  
  <ul>
  <li>Link</li>
  <li>Link</li>
  <li><del>Dropdown</del></li>
  <li>Action</li>
  <li>Another action</li>
  <li>Something else here</li>
  <li>Separated link</li>
  <li>One more separated link</li>
  </ul>
  
  <p>My first thought was to use <code>display: none</code> on <code>a.dropdown-toggle</code> but that just hides the whole dropdown menu. Hoping someone can suggest something. I'm open to both jQuery and CSS solutions.</p>
  
  <p>My markup:</p>
  
  <pre><code>&lt;nav class="navbar navbar-default" role="navigation"&gt;
    &lt;div class="container-fluid"&gt;
      &lt;!-- Brand and toggle get grouped for better mobile display --&gt;
      &lt;div class="navbar-header"&gt;
        &lt;button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"&gt;
          &lt;span class="sr-only"&gt;Toggle navigation&lt;/span&gt;
          &lt;span class="icon-bar"&gt;&lt;/span&gt;
          &lt;span class="icon-bar"&gt;&lt;/span&gt;
          &lt;span class="icon-bar"&gt;&lt;/span&gt;
        &lt;/button&gt;
        &lt;a class="navbar-brand" href="#"&gt;Brand&lt;/a&gt;
      &lt;/div&gt;
  
      &lt;!-- Collect the nav links, forms, and other content for toggling --&gt;
      &lt;div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"&gt;
        &lt;ul class="nav navbar-nav"&gt;
          &lt;li class="active"&gt;&lt;a href="#"&gt;Link&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;Link&lt;/a&gt;&lt;/li&gt;
          &lt;li class="dropdown"&gt;
            &lt;a href="#" class="dropdown-toggle" data-toggle="dropdown"&gt;Dropdown &lt;span class="caret"&gt;&lt;/span&gt;&lt;/a&gt;
            &lt;ul class="dropdown-menu" role="menu"&gt;
              &lt;li&gt;&lt;a href="#"&gt;Action&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;Another action&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;Something else here&lt;/a&gt;&lt;/li&gt;
              &lt;li class="divider"&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;Separated link&lt;/a&gt;&lt;/li&gt;
              &lt;li class="divider"&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;One more separated link&lt;/a&gt;&lt;/li&gt;
            &lt;/ul&gt;
          &lt;/li&gt;
        &lt;/ul&gt;
      &lt;/div&gt;&lt;!-- /.navbar-collapse --&gt;
    &lt;/div&gt;&lt;!-- /.container-fluid --&gt;
  &lt;/nav&gt;
  </code></pre>