Method stop() menghentikan antrean efek atau animasi yang sedang diproses pada elemen yang dipilih.
jQuery stop()
Contoh Kode jQuery jQuery stop():
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
</head>
<body style="font-family: sans-serif; padding: 20px;">
<button id="btnMulai">Mulai Slide</button>
<button id="btnStop" style="color:red;">Hentikan (Stop)</button>
<div id="panelStop" style="background:#0d2e5c; color:white; height:120px; padding:20px; margin-top:10px; display:none;">Panel Animasi</div>
<script>
$('#btnMulai').click(function() { $('#panelStop').slideDown(5000); });
$('#btnStop').click(function() { $('#panelStop').stop(); });
</script>
</body>
</html>
Uji interaksi jQuery di atas dan amati animasi efek DOM secara langsung.