Web Hosting Geeks | Web Hosting Experts
Need help? Call us 1(866)TOP-HOST

14217 reviews 1686 hosting providers

Questions & Answers

Add 10 sec delay on a Javascript popup

Mar 22, 2013 by DinoGuy
Hi,

I  want to add a 10 second delay on the popup:
<script type="text/javascript">
$(document).ready(function() {
$('#mynewmodel').reveal();
});

can anyone please help?
Thank you

1 Answer

0 votes
Mar 22, 2013 by SmartHost
Try this JavaScript code
HTML Code:
<script type="text/javascript">
    setTimeout(function(){
        // put your code here
    },10);
</script>
Will code like this:
HTML Code:
<script type="text/javascript">
    $(document).ready(function(){
      setTimeout(function(){
         $('#mynewModel').reveal();
      },1000);
    });   
</script>