I’m using jQuery with Easing plugin and i would like to achieve constant easing times for for animations of any duration:
Short animation (X milliseconds)
|<<<<|-------------------|>>>>|
10ms 10ms
Long animation (2X milliseconds)
|<<<<|-----------------------------------------|>>>>|
10ms 10ms
Where <<<< / >>>> are easing-in / easing-out periods, and --- denotes constant velocity movement.
Is there an easing function/plugin for that or should i give a time-dependent custom function for each animation like this and, if yes, then what kind?
You can use the callback function in the
.animate()calls to chain animations:I’m not sure what you want to set the animation to animate or what duration to use but there’s an idea.