title: Close lightbox on clicking outside not working in iPhone/iPad
body: <p>Below is the code I am using. Clicking outside closes the lightbox in Windows and Android, but not in iPhone and iPad.</p>
  
  <p><strong>JS:</strong></p>
  
  <pre><code>$(document).on('click', function(event) {
    if ($(event.target).has('.pop-up').length) {
      $('.pop-up-overlay').hide();
    }
  });
  </code></pre>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;div class="pop-up-overlay"&gt;
    &lt;div class="pop-up"&gt;
      &lt;p&gt;Popup contents goes here.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>