Adding time out pop for my script

Hello,
I’ve found script popup but there is no time out. I need help how to add time out to my script that will show pop up after several second. Thanks

Here is the script :

<div id='mtc-popup'>
<code onmouseup='document.getElementById(&#39;mtc-popup&#39;).style.display=&#39;none&#39;' style='color:#000;cursor:pointer;float:right;margin-right:-20px;margin-top:-20px;'>
<div class='mtc-style-popup' id='mtc-style-popup'>

<<html code here>>

</div>
</code>
</div>

and the CSS is :

#mtc-style-popup
{
background-color: #fff;
overflow: none;
}
#mtc-style-popup
{
background-color: #fff;
overflow: none;
}
.mtc-style-popup
{
width: 336px;
height: 299px;
position: fixed;
top: 50%;
left: 47%;
margin-top: -100px;
margin-left: -160px;
border: 2px solid red;
padding: 0px;
}

Very appreciate for youre help. Thanks

Hi,

If you’re just looking to execute a function after a delay, use setTimeout.

setTimeout(myfunc, delay-in-milliseconds);

This article goes into more detail:

(Don’t be confused by jquery in the title, that was for SEO purposes).

If you’re looking for a way to only show the popup once per day (for example), this article explains how:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.