JQUERY stop

Click Here

The stop effect serves to stop the animation that is taking effect and leave at that point of the animation.

It can serve for an effect from a minimum value to a maximum value, and the user can choose a value (stop) the duration of the animation.

JQUERY stop

$(selector).stop(stopAll,goToEnd);

The optional parameter "stopAll" lets stop other subsequent animations. Default is set to "false" value indicates that only the current animation. If then there are more animations, if you execute these.

The optional parameter "gotoEnd" completes the animation immediately, without waiting for the entire duration of the effect. The default value is false, indicating that no full animation, simply makes the point that is. It's like a "pause".

Example JQUERY stop

With a button "start" we can start the effect of sliding down "layer1", which will last 6 seconds element and a "stop" button can stop the effect at the desired point.

$("#start").click(function(){ $("#layer1").slideDown(6000); }); $("#stop").click(function(){ $("#layer1").stop(); });

Click Here