JSFiddle - React, Tailwind, and code Playground
by envira
HTML
<script src="http://www.jacklmoore.com/colorbox/jquery.colorbox.js"></script>
<link rel="stylesheet" href="http://www.jacklmoore.com/colorbox/example1/colorbox.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
<h1>Hello, there!</h1>
<h2>This is some content</h2>
<p>The popup will open in five seconds</p>
JavaScript
$(document).ready(function () {
if (document.cookie.indexOf('visited=true') == -1) {
var oneDay = 1000 * 60 * 60 * 24 * 1;
var expires = new Date((new Date()).valueOf() + oneDay);
document.cookie = "visited=true;expires=" + expires.toUTCString();
setTimeout(openColorBox, 3000);
}
function openColorBox() {
$.colorbox({ html: "<iframe src=\"\"></iframe>", fixed: true });
}
});