-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Option Drag
Ryc O'Chet edited this page Jun 10, 2018
·
1 revision
- NOTE: This documentation is for Velocity v2.
Set the drag
option to true
to successively increase the animation duration of each element in a set. The last element will animate with a duration equal to the animation's original value, whereas the elements before the last will have their duration values gradually approach the original value. The end result is a cross-element easing effect.
// The first two elements will have their duration decreased compared to the rest.
var elements = [ element1, element2, element3, element4, element5, element6, element7, element8 ];
elements.velocity({
left: "10em"
}, {
duration: 1000,
drag: true
});