In order to run a function automatically after waiting for some time, we are using the jQuery delay() method.
The .delay() method in jQuery which is used to set a timer to delay the execution of the next item in the queue.
- When the Button is clicked the process is delayed to the specific time period using .delay() method.
- Functions or process is queued using .queue() method.
After the process or functions are excuted, all excuted functions are dequeued using .dequeue() method.
Example 2: Along with alert method
- How to scroll automatically to the Bottom of the Page using jQuery?
- How to call PHP function on the click of a Button ?
- How to call PHP function from string stored in a Variable
- PHP | time() Function
- Print PHP Call Stack
- How to make a call-able link using HTML ?
- jQuery | jQuery.support Property
- jQuery | jQuery.fx.interval Property with example
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.