timeout function in an timeout function code example
Example 1: settimout jquery
setTimeout(function(){ alert("Hello"); }, 3000);
Example 2: javascript settimeout
// Redirect to index page after 5 sec
setTimeout(function(){ window.location="index"; },5000);