Tutorial :Have html appear after 5 Seconds



Question:

I have a bit of a little popup warning thing, and I'd like it to appear after 5 seconds as oppose to right away. All it is is direct html. Anyone know how to do it?

Thanks

edit: it's not actually a popup, it just comes up and shows the user a message about their account. And it's needed because it takes 5 seconds for part of it to load, and it doesn't function properly if it's clicked / used by the user within 5 seconds of showing up


Solution:1

How about using jQuery, specifically .delay() and .fadeIn()?


Solution:2

First, you should consider if you really want to do this - given the rise of popup blockers and the association of popups with dirty rotten advertisements, people are generally negatively predisposed to popups, if their browser even displays them.

But, if you really want to do it, you need to run some javascript:

<script type="text/javascript">  setTimeout(      function() {          window.open('linkToYourPopup.htm', 'popupWindow', 'width=400,height=200,scrollbars=no');      }, 5 * 1000); // 5 * 1000 = 5000 milliseconds = 5 seconds  </script>  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »