Run jQuery to reload page every 2 seconds - Javascript Browser Object Model

Javascript examples for Browser Object Model:Window setTimeout

Description

Run jQuery to reload page every 2 seconds

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.10.0.js"></script> 
      <script type="text/javascript">
    $(window).load(function(){/*from w w w.j ava 2 s . c  o m*/
$(document).ready(function(){
    setTimeout(function(){
        window.location.reload();
    }, 2000);
});
    });

      </script> 
   </head> 
   <body>  
   </body>
</html>

Related Tutorials