title: How to close popup when click anywhere in website
body: <p>I want to close popup ad when user click anywhere in body.</p>
  
  <p>This is my site <a href="http://daplonline.in/" rel="nofollow noreferrer">http://daplonline.in/</a>. I want to hide or close ad when user click anywhere in website.</p>
  
  <p>This is popup html code:</p>
  
  <pre><code>&lt;div style="top: 100px; background-color: rgba(5, 5, 0, 0.7); display: block;" id="wd1_nlpopup" data-expires="30" data-delay="10"&gt;
      &lt;div id="overlay"&gt;
          &lt;a href="#closepopup" id="wd1_nlpopup_close"&gt;x&lt;/a&gt;
          &lt;div class="content"&gt;  
              &lt;a href="buyonline.php"&gt;&lt;img src="images/online_course.gif"/&gt;&lt;/a&gt;
          &lt;/div&gt;                  
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>This is JavaScript code:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $("body").click(function(){
          alert("me");
      });
  &lt;/script&gt;
  </code></pre>