AJAX
Basics
Data
DOM
Effects
Events
Forms
jQuery UI
Plug Ins
Traversing
The jQuery stop() method is used to stop animations or effects before it is finished.
$(selector).stop(stopAll, goToEnd);
The jQuery stop()
method is used to stop an animation or effect before it is finished.
The stop()
method works for all jQuery effect functions, including sliding, fading and custom animations.
http://api.jquery.com/category/effects/custom-effects/
$(document).ready(function ()
{
$("#btnAnimate").click(function ()
{
$("#demo1").animate
(
{
left: '250px',
opacity: '0.5',
height: '150px',
width: '150px'
}, 100000
);
});
$("#btnStop").click(function () { $("#demo1").stop(); });
});