title: Bootstrap dropdown closing when clicked
body: <p>I put a form inside a bootstrap dropdown, but when I click any of the fields in the form, the dropdown goes away. I have this piece of code but I don't know where to put it to prevent the dropdown disappearing.</p>
  
  <pre><code>$(function test() {
    // Setup drop down menu
    $('.dropdown-toggle').dropdown();
  
    // Fix input element click problem
    $('.dropdown input, .dropdown label').click(function(e) {
      e.stopPropagation();
    });
  });
  </code></pre>
  
  <p>Could someone please tell me where I should put this? I tried in the bootstrap-dropdown, I tried within the HTML but it still doesn't work.</p>