Skip to content
Ryc O'Chet edited this page Feb 1, 2018 · 2 revisions
- NOTE: This documentation is for Velocity v2.

Command: Finish

To prematurely jump to the end of an animation, use the finish command by passing in "finish" as Velocity's first argument.

element.velocity("finish");

Whereas Velocity's stop command abruptly aborts an animation and leaves its animation properties at whatever values they had at the exact moment of stopping, finish applies the animation's desired final property values. Also, unlike stop, finish doesn't prevent a call's complete callback from occurring. In short, think of the finish command as a means of immediately jumping to the last frame in an animation call.

Please read the stop section for full details of the rest of it's behaviour.