I’m looking for an online list of custom easing functions that I can use with jQuery.
I’m not interested in using a plugin for this, nor am I using jQuery UI.
I found one below that does a nice little bounce but I’m looking for a few others just so I can have some options.
In lieu of of other functions, a brief explanation of how this one operates and might be modified would be awesome. Thank-you!
Example:
$.easing.custom = function (x, t, b, c, d) {
var s = 1.70158;
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
}
EDIT #1:
Here’s an online demo of all jQuery UI easing functions. Source functions from UI are posted below in correct answer by Jake.
http://api.jqueryui.com/easings/
EDIT #2:
It turns out that the example easing function I posted above is exactly the same as the “easeInOutBack” from jQuery UI.
EDIT #3:
Here are some more stand-alone easing equations free for downloading…
Provided that you follow the BSD licensing provisions, you can cherry-pick the easing functions that you want directly from the jQuery UI source code. Note that some of these functions depend on other functions within the list.
To view and compare these easing functions in action, see: http://api.jqueryui.com/easings/