1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
Velocity.Easings.myCustomEasing = function(p, opts, tweenDelta) { return Tween.Bounce.easeOut(p* opts.duration ,0,tweenDelta,1*opts.duration)/tweenDelta; };
document.querySelector('#dummy1').addEventListener('click',function(){ Velocity(document.querySelector('#dummy1'), { top: '300px' }, { easing: 'myCustomEasing', duration: 600 }) })
|