Side navigation
#127 closed enhancement (fixed)
Opened August 17, 2006 07:08PM UTC
Closed January 10, 2007 06:22PM UTC
Last modified June 21, 2007 04:33AM UTC
Add support for custom easing
Reported by: | choan.galvez@gmail.c | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.1a |
Component: | effects | Version: | 1.1a |
Keywords: | easing | Cc: | |
Blocked by: | Blocking: |
Description
Add in support for users to add in their own custom easing/step functions.
Attachments (1)
Change History (3)
Changed August 18, 2006 12:43PM UTC by comment:1
Changed November 17, 2006 10:17PM UTC by comment:2
description: | It'd be interesting to allow the use of customized easing in the effects.\ \ Interesting readings and BSD/ActionScript equations at http://www.robertpenner.com/easing/ → Add in support for users to add in their own custom easing/step functions. |
---|---|
summary: | Add custom easing to effects → Add support for custom easing |
Changed January 10, 2007 06:22PM UTC by comment:3
milestone: | → 1.1a |
---|---|
resolution: | → fixed |
status: | new → closed |
version: | → 1.1a |
This is in 1.1.
John, I've modified fx.js to allow the custom easing in the effects + the callback for every step suggested at http://proj.jquery.com/dev/bugs/bug/26/
Using the
animate
function, the syntax is as follows$('#someselector').animate( { left: 200 }, "slow", { easing: somefunction, step: someotherfunction);
You'll find the diff file and a HTML test at http://scriptia.net/temp/jquery/easing/
Easing functions follows the model described at http://www.robertpenner.com/easing/ in that they receive four parameters (moment in time, beginning value, total change, duration) an return one value.
While testing the simultaneous animation of more than one property, I've found a bug in
jQuery.speed
which I thing I've fixed by doing theoldComplete
thing just one time in each call to animate.Hope these descriptions make sense!