delay() method in jQuery

delay() in jQuery

delay() method is used to set delay duration for the various effects used.

It sets a timer which set duration to delay for the next item to be executed.


$(selector).delay(duration[, queueName])

  • duration
    • Default value is 400.
    • number - Integer values are given in milliseconds.
    • slow - It specifies 600 milliseconds.
    • fast - It specifies 200 milliseconds.
  • queueName - A string containing the name of the queue. Defaults to fx, the standard effects queue.

Example 1 - delay() method

Try Yourself

Example 2 - multiple delay() methods

Try Yourself

Example 3 - multiple delay() methods

Try Yourself