title: How do I close a combo box with javascript?
body: <p>I'm pretty new to javascript, so please forgive my ignorance.  I'm trying to do something that seems like it should be incredibly simple...close a combo box.  However, when I use the hide() function, it not only closes the combo box, but it removes it entirely.  Is there any way to just close it?</p>
  
  <p>EDIT:</p>
  
  <p>Here's the actual code I'm using</p>
  
  <pre><code>$(window).ready(function ()
  {
      $('#comboBox .dropdown-menu').mouseleave(function ()
      {
          $("#comboBox").hide();
      });
  });
  </code></pre>
  
  <p>This removes the combo box from the page when the mouse leaves the open combo box.  If I replace hide with blur, nothing happens at all.</p>
  
  <p>Edit 2:</p>
  
  <p>Here's the code for my actual list:</p>
  
  <pre><code>&lt;div class="btn-group" id="comboBox"&gt;
                      &lt;button class="btn btn-custom-top dropdown-toggle" data-toggle="dropdown"&gt;&lt;span class="caption"&gt;&lt;/span&gt;&lt;span class="caret"&gt;&lt;/span&gt;&lt;/button&gt;
                      &lt;ul class="dropdown-menu"&gt;
                      &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Edit 3:</p>
  
  <p>Alright, I was obviously confused about what I was doing.  No surprise there, as I'm very new to all this.  It's not actually a combo box that I'm trying to close.  It's a bootstrap dropdown button type, which doesn't really have the same behavior as a combo box.  It's looking like there is no function ready-made to do what I want.</p>