Latest web development tutorials

jQuery effect delay () method

jQuery Effect Methods jQuery Effect Methods

Examples

Different <div> element to set the delay:

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

try it"

Definition and Usage

delay () method to set a delay for the implementation of the queue the next one.


grammar

$(selector).delay(speed,queueName)

参数 描述
speed 可选。规定延迟的速度。

可能的值:

  • 毫秒
  • "slow"
  • "fast"
queueName 可选。规定队列的名称。

默认是 "fx",标准效果队列。


Examples

Try - Example

delay () and animate ()
How to delay a movie.


jQuery Effect Methods jQuery Effect Methods