I’m looking for a simple popup that can be displayed after 10 seconds of someone being on the page, but only appearing once per customer once a day.
I have come across this code that was previously posted on a separate thread, the popup works exactly how i want it, apart from it’s an iFrame, I was looking for inline content if possible, that can be easily changed.
<!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>
I’m not too worried about using the colourbox code, is there a simple javascript/css popup option that you may know off that would be just as effective?
I got another quick question if you don’t mind Megazoid.
The code you have given me was excellent and i have no implemented it on our test server, the only issue is due to how the website is built i had to put the code on a php file, meaning the ad appears on every page…
Is it possible that so once the ad appear for someone, it will save it as a cookie and won’t appear for another 24 hours or something like that?