title: If statement (button not clicked)
body: <p>I want to hide an element if it is clicked outside the element it self. als But it can't be closed if the menu button is clicked.</p>
  
  <p>Now I have the following code:</p>
  
  <pre><code>$(document).mouseup(function test (e) {
    var button = $('.menu-button').data('clicked', true);
    var container = $(".sf-menu");
      if (!container.is(e.target) &amp;&amp; container.has(e.target).length === 0 &amp;&amp; button.data('clicked') == false) {
          container.hide();
      }
  });
  </code></pre>
  
  <p>But the problem seems to be in:</p>
  
  <pre><code>button.data('clicked') == false)
  </code></pre>
  
  <p>How to write this code correctly?</p>
  
  <p>Thnx!</p>