title: How to catch any click event in jquery
body: <p>I have a button, when it's clicked, shows a div with images(like an emoticon panel of a chat) if I click it again the div hides, but what I want to do is:
  If the div is already showed up and then I click any other thing of the page, I want to hide it. I tried this:</p>
  
  <pre><code>$("myBtn").click(function(){
      // show div
  });
  
  $(document).click(function(){
  // hide div
  });
  </code></pre>
  
  <p>When "myBtn" is clicked, the div shows up and hide automatically. How could I fix it ? </p>
  
  <p>Thank you for your time.</p>