title: jquery popup time delay
body: <p>My This following script open popup box when page load . all Working fine But it loading immediately when page loading . i need add time delay function i want open popup after 5 seconds</p>
  
  <pre><code>$(function() {
    setTimeout(function() {
  
      var overlay = $('&lt;div id="overlay"&gt;&lt;/div&gt;');
      overlay.show();
      overlay.appendTo(document.body);
      $('.popup').show();
      $('.close').click(function() {
        $('.popup').hide();
        overlay.appendTo(document.body).remove();
        return false;
  
      });
  
  
      $('.x').click(function() {
        $('.popup').hide();
        overlay.appendTo(document.body).remove();
        return false;
      });
  
    });
  }, 3000);
  </code></pre>