X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

jQuery delay() Method

jQuery Effect Methods jQuery Effect Methods

Example

Delay different <div> elements:

$("button").click(function(){
  $("#div1").delay("slow").fadeIn();
  $("#div2").delay("fast").fadeIn();
});

Try it yourself »

Definition and Usage

The delay() method sets a timer to delay the execution of the next item in the queue.


Syntax

$(selector).delay(speed,queueName)

Parameter Description
speed Optional. Specifies the speed of the delay

Possible values:

  • milliseconds
  • "slow"
  • "fast"
queueName Optional. Specifies the name of the queue

Default is "fx", the standard effects queue


Examples

Try it Yourself - Example

delay() and animate()
How to delay an animation.


jQuery Effect Methods jQuery Effect Methods


Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook