Delay (Duration,[queuename])
Set a delay to postpone the execution of the item after the queue.
JQuery 1.4 is new. Used to delay the execution of functions in a queue. He can either postpone the execution of the animation queue or use it to customize the queue.
Duration: Delay time, Unit: milliseconds
QueueName: queue noun, default is FX, animation queue.
Parameters |
Description |
Speed |
Optional. Specify the speed of the delay. Possible values:
- Milliseconds
- "Slow"
- "Fast"
|
QueueName |
Optional. Specify the name of the queue.
The default is "FX", the standard effect queue. |
$ ("button"). Click (function () {
$ ("#div1"). Delay ("slow"). FadeIn ();
$ ("#div2"). Delay ("fast"). FadeIn ();
Complete test Code:
Cases:
Lazy load animation effect on head and bottom
$ (document). Ready (function () {
$ (' #header ').
css ({' Top ': -50})
. Delay (1000).
Animate ({' Top ': 0}, );
$ (' #footer ')
. css ({' Bottom ': -15})
. Delay (1000).
Animate ({' Bottom ': 0},);
});