title: JavaScript - hide element when click outside not working on mobile phone
body: <p>Hiding modal windows works fine on desktop computer with this code</p>
  
  <pre><code>$(document).mouseup(function (e){
      if ($("#full_window_dim").is(':visible') &amp;&amp; !$("#hodnotenie_hl_okno").is(e.target) &amp;&amp; $("#hodnotenie_hl_okno").has(e.target).length === 0){
          $("#full_window_dim").fadeOut();
          $('html, body').removeClass('stop-scrolling');
  }
  });
  </code></pre>
  
  <p>but this code is not working on mobile phones (I have tried with iPhone 5 - Safari)</p>
  
  <p>How can I hide the element when users taps outside of the window on mobile phones ?</p>