jQuery stop() Metode

Metode Efek jQuery

Contoh

Hentikan animasi yang sedang berjalan:

$("#stop").click(function(){
  $("div").stop();
});

Definisi dan Penggunaan

Metode stop() menghentikan animasi yang sedang berjalan untuk elemen yang dipilih.


Sintaksis

$(selector).stop(stopAll,goToEnd)

Parameter Description
stopAll Optional. A Boolean value specifying whether or not to stop the queued animations as well. Default is false
goToEnd Optional. A Boolean value specifying whether or not to complete all animations immediately. Default is false

Cobalah Sendiri - Contoh


Cara menghentikan animasi yang antri.


Cara menyelesaikan semua animasi dengan segera.


Metode Efek jQuery