set Timeout function in code example
Example 1: settimeout jquery
setTimeout(function(){ alert("Hello"); }, 3000);
Example 2: delay in javascript
setTimeout(function() {
//your code here
}, 1000);
setTimeout(function(){ alert("Hello"); }, 3000);
setTimeout(function() {
//your code here
}, 1000);