add delay before calling function js code example
Example 1: how to delay something in javascript
setTimeout(/*how many milaseconds you want to delay */)
Example 2: jquery delay to call function
$(this).delay(1000).queue(function() {
// your Code | Function here
$(this).dequeue();
});