Home > jQuery > How to Set a Wait Time to Code in jQuery
Bookmark and Share

How to Set a Wait Time to Code in jQuery

Posted on March 30, 2018 | Filed in jQuery

There are times when you will want to have something happen after X amount of seconds. To do this you would use:

window.setTimeout(function(){
// Code here
}, 5000 ); // 5 seconds

The 5000 is in milliseconds, so this would happen after 5 seconds. Unlike the setInterval function, setTimeout occurs once.

Leave a Reply

Contact Us

Big Apple Design Group
134 West 29th Street
Third Floor
New York, NY 10001

[email protected]

Search Blog