Use .stop()
method.
$("#box").slideDown(5000);
$("#stopBtn").click(function(){
$("#box").stop(); // stops animation
});
Use .stop()
method.
$("#box").slideDown(5000);
$("#stopBtn").click(function(){
$("#box").stop(); // stops animation
});
Leave a Reply