jQuery delay() Metode
Contoh
Tunda elemen <div> yang berbeda:
$("button").click(function(){
$("#div1").delay("slow").fadeIn();
$("#div2").delay("fast").fadeIn();
});
Definisi dan Penggunaan
Metode delay() menyetel timer untuk menunda eksekusi item berikutnya dalam antrian.
Sintaksis
$(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 |
Cobalah Sendiri - Contoh
Cara menunda animasi.