jQuery setTimeout() Function and its examples

setTimeout function

jQuery setTimeout() Function and its examples

setTimeout is a jQuery function which  executes a code snippet or another function after a specified delay (in seconds or milliseconds). Many Time we need to run or executes some code snippet or function after some time or some delay, can use setTimeout() function.

Syntax

the syntax for setTimeout is as follows:

setTimeout(function(), [delay, param1, param2, …]);

Examples of Use

You can call another function inside setTineout that will execute after specified  time.

A variable that refers to a function:

Or an anonymous function:

 


[paypal-donation]

About Vijay Dhanvai

A passionate blogger by heart and mind, I have been working in this field for 10 years now. A WordPress Professional, web developer and designer who intends to guide his readers about Web Design, WordPress, Blogging, Web Development, and more.

Leave a Reply