title: Click outside menu to close it
body: <p>Here's my function,</p>
  
  <pre><code>$(document).ready(function () {
     $('.a').click(function () {
       var here = $(this).next('.b');
      if (here.is(":visible")) {
          here.hide();
      } else {
          here.show();
      }
      return false;
    });
  });
  </code></pre>
  
  <p>So, whenever I click the button it opens a small tab on same webpage &amp; whenever I click it again it closes it. But once I open the tab I can't close it by just clicking somewhere on webpage apart from tab. I have to click the button again to close it.</p>
  
  <p>How can I close tab just by clicking somewhere on webpage also by on the button?</p>