Bug Tracker

Opened 15 years ago

Closed 15 years ago

Last modified 14 years ago

#127 closed enhancement (fixed)

Add support for custom easing

Reported by: [email protected] Owned by:
Priority: minor Milestone: 1.1a
Component: effects Version: 1.1a
Keywords: easing Cc:
Blocked by: Blocking:

Description (last modified by john)

Add in support for users to add in their own custom easing/step functions.

Attachments (1)

easing.html (1.7 KB) - added by [email protected] 15 years ago.
HTML test

Download all attachments as: .zip

Change History (4)

Changed 15 years ago by [email protected]

Attachment: easing.html added

HTML test

comment:1 Changed 15 years ago by choan.galvez

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 the oldComplete thing just one time in each call to animate.

Hope these descriptions make sense!

comment:2 Changed 15 years ago by john

Description: modified (diff)
Summary: Add custom easing to effectsAdd support for custom easing

comment:3 Changed 15 years ago by john

Milestone: 1.1a
Resolution: fixed
Status: newclosed
Version: 1.1a

This is in 1.1.

Note: See TracTickets for help on using tickets.