Metoda jQuery delay()
Przykład
Opóźnij różne elementy <div>:
$("button").click(function(){
$("#div1").delay("slow").fadeIn();
$("#div2").delay("fast").fadeIn();
});
Definicja i użycie
Metoda delay() ustawia zegar, aby opóźnić wykonanie następnego elementu w kolejce.
Składnia
$(selector).delay(speed,queueName)
Parameter | Description |
---|---|
speed | Optional. Specifies the speed of the delay Possible values:
|
queueName | Optional. Specifies the name of the queue Default is "fx", the standard effects queue |
Spróbuj sam — przykład
Jak opóźnić animację.