title: Avoid dropdown close on clicking outside
body: <p>Avoid dropdown closing by clicking outside.Show and hide dropdown while clicking only on button. Heres the <a href="https://jsfiddle.net/2fgp0Lw6/1/" rel="noreferrer">fiddle</a>. </p>
  
  <pre><code>&lt;div class="dropdown"&gt;
    &lt;button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown"&gt;Dropdown Example
    &lt;span class="caret"&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;ul class="dropdown-menu"&gt;
      &lt;li&gt;&lt;a href="#"&gt;HTML&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#"&gt;CSS&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#"&gt;JavaScript&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>