JavaScript Delay

Posted in : Code Snippets, JavaScript on by : admin , freemium Comments: 0

Use this snippet to set a delay on your function.

var delayMillis = 1000; //1 second

setTimeout(function() {
  //your code to be executed after 1 second
}, delayMillis);
Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

Leave a Reply

Your email address will not be published. Required fields are marked *