Need a simple popup (modal, on-page-load with time-delay, fast & clean)

Note: This topic has proven so popular that I have published an article about it over on SitePoint’s JS channel: Quick-Tip: Show Modal Popup after Time Delay


Hi,

Welcome to the forums :slight_smile:

Colorbox can do what you need.
It looks good, can display an iframe and can be set that it can fire a few seconds after page load.
Cookies should also be possible.

Here’s a demo (minus cookies) that you can copy and run on your PC.
Is this the kind of thing you want?

<!DOCTYPE html>
<html>
  <head>
    <meta charset=utf-8 />
    <title>ColorBox demo</title>
    <link rel="stylesheet" href="http://www.jacklmoore.com/colorbox/example1/colorbox.css" />
  </head>
  <body>
    <h1>Hello, there!</h1>
    <h2>This is some content</h2>
    <p>The popup will open in five seconds</p>

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
    <script src="http://www.jacklmoore.com/colorbox/jquery.colorbox.js"></script>
    <script>
      function openColorBox(){
        $.colorbox({iframe:true, width:"80%", height:"80%", href: "http://www.sitepoint.com"});
      }
      
      setTimeout(openColorBox, 5000);
    </script>
  </body>
</html>