Add 10 sec delay on a Javascript popup

87 views
asked Mar 22, 2013 in General by DinoGuy (2,130 points)
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 like 0 dislike
answered Mar 22, 2013 by SmartHost (9,060 points)
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>
...