title: Close Tooltip on Body Click Event - not working properly
body: <p>I've got this fiddle:
  <a href="http://jsfiddle.net/u8t77p75/" rel="nofollow">http://jsfiddle.net/u8t77p75/</a></p>
  
  <p>I want to achieve that, when I click on "body" the js will check if actual a tip is visible and if so hide this.</p>
  
  <p>I wanted to try something like:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>if ($tooltipContainer.hasClass('active')) {
   $('body').click(function() {
        $tipLink.triggerHandler('click');
   });
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>It works but not perfectly. When I insert this snippet, it calls the trigger, but I need to click several times to open or close. I think it's because the whole click-function get's invoked. Do I need to do something else?</p>