javascript .interval code example
Example 1: javascript setinterval
setInterval(function() {
//Your code
}, 1000); //Every 1000ms = 1sec
Example 2: javascript settimeout
// Redirect to index page after 5 sec
setTimeout(function(){ window.location="index"; },5000);