How to set delay for this pop up


i have made a subscription pop up i wanna set delay time of 5 secs for that pop-up and show only once per user using cookies could you guys alter this script !!!


<div id='om-pqj3zwq5bz-lightbox' style='float:center; position: fixed; z-index: 7371832; top: 0px; left: 0px; zoom: 1; width: 100%; height: 100%; margin: 0px; display: block;'>
<link href='' rel='stylesheet' type='text/css'/>
<form action='' method='post'><div class='om-lightbox-case-study-theme om-clearfix' id='om-lightbox-case-study-theme-optin' style='top: 56.5px; left: 281.5px; display: block;'><div class='om-clearfix' id='om-lightbox-case-study-theme-optin-wrap'><a href='javascript:void(0)' id='om-close' onclick='document.getElementById(&#39;om-pqj3zwq5bz-lightbox&#39;).style.display=&#39;none&#39;;document.getElementById(&#39;om-pqj3zwq5bz-lightbox&#39;).style.display=&#39;none&#39;' title='Close'></a><div class='om-clearfix' id='om-lightbox-case-study-theme-optin-bar'><span class='om-bar om-red-bar'></span><span class='om-bar om-green-bar'></span><span class='om-bar om-orange-bar'></span><span class='om-bar om-blue-bar'></span></div><div class='om-clearfix' id='om-lightbox-case-study-theme-header'><h1 class='om-clearfix' id='om-lightbox-case-study-theme-optin-title' style='font-family:&#39;Bree Serif&#39;, sans-serif;font-size:50px;font-weight:normal;font-style:normal;text-decoration:none;'>How To Become a Pro Blogger</h1><h2 class='om-clearfix' id='om-lightbox-case-study-theme-optin-tagline' style='color:#8e8e8e;font-size:24px;font-weight:normal;font-style:italic;text-decoration:none;'>GET NEW BLOGGING TIPS DIRECTLY TO YOUR INBOX</h2></div><div class='om-clearfix' id='om-lightbox-case-study-theme-content'><div id='om-lightbox-case-study-theme-content-clear'><div id='om-lightbox-case-study-theme-left'><div id='om-lightbox-case-study-theme-optin-image-container'><img alt='case-study-png' class='attachment-full wp-post-image' src=''/></div></div><div class='om-has-name-email' id='om-lightbox-case-study-theme-right'><img alt='Arrow' id='om-lightbox-case-study-theme-arrow' src=''/><input id='om-lightbox-case-study-theme-optin-name' placeholder='Enter Your Name' style='font-weight:normal;font-style:normal;text-decoration:none;text-align:left;' type='text' value=''/><input id='om-lightbox-case-study-theme-optin-email' placeholder='Enter Your Email' style='font-weight:normal;font-style:normal;text-decoration:none;text-align:left;' type='email' value=''/><input id='om-lightbox-case-study-theme-optin-submit' style='background-color: rgb(120, 172, 6); border-color: rgb(120, 172, 6); font-family: &#39;Bree Serif&#39;, sans-serif; font-size: 22px; font-weight: normal; font-style: normal; text-decoration: none; text-align: center; height: 58px; line-height: 36px;' type='submit' value='Grab Free Resources Now'/></div></div></div></div></div><script type='text/javascript'>function om_js_pqj3zwq5bz_lightbox(){this.init = function($){this.resize_element($, "div#om-pqj3zwq5bz-lightbox #om-lightbox-case-study-theme-optin");},this.resize_element = function($, el){$(el).css({ top: ($(window).height() - $(el).outerHeight()) / 2, left: ($(window).width() - $(el).outerWidth()) / 2 });$(window).resize(function(){$(el).css({ top: ($(window).height() - $(el).outerHeight()) / 2, left: ($(window).width() - $(el).outerWidth()) / 2 });});}}</script></form></div>

please edit the above code and add delay time of 5 seconds and pop-up must be shown only once per user using cookies :smiley:


Issac if I share the script right away then what is the point in learning it by yourself? There are many popup scripts available online but if you want to really understand how cookies work in blogger and how to set a timer in popup then you must read the following two posts and get back to me if in case you needed more help.

The following posts contains a popup which uses both HTML5 storage cookies and also a counter that can easily be configured

And this beautiful tutorial that will teach you how to add cookies to any HTML elment on your blog


Hey bro i donno much coding i am 16 yrs old & i don’t have comp. sci as a subject i made this much script using inspect element :slight_smile: thanks for sharing your post will try to learn :slight_smile:


than you are really lucky because you have around 5 years before you get graduate and be the next great coder and blogger! So keep the practice on! Never rely on shortcuts :angel:


Your comment really motivated me :smile: finished making that widget it came out awesome & i have published it on my blog made that widget free for all :smile: Thanks for the help I have made optinmoster pop-up widget for blogger blogs which looks 99.9% same as the real one here take a look & give your feedback: