Skip to main content

Bug Tracker

Side navigation

#5540 closed bug (invalid)

Opened November 20, 2009 07:06PM UTC

Closed June 13, 2010 06:52PM UTC

Custom easing callback not working?

Reported by: olau Owned by:
Priority: major Milestone: 1.4
Component: unfiled Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:
Description

Hi!

According to ticket 127, it seems like it should be possible to specify a easing callback in animate(), like this:

function myEasing(...) { ... }

$("h1").animate({ left: 100}, { easing: myEasing });

But it doesn't seem to work? Also I couldn't find anything about it in the documentation?

I know it's possible to register callbacks in jQuery.easing, but I'd like to generate a callback with some randomized parameters in a closure when I start the animation, and then jQuery.easing is awkward.

Attachments (0)
Change History (2)

Changed November 20, 2009 07:22PM UTC by olau comment:1

Rationale: think of the stuff in the easing plugin, rather than having separate one bounce, two bounces, three bounces etc. effects, you could make a little function that given the number of bounces returns a closure that calculates an easing effect with that amount of bouncing. Like

.animate({...}, { easing: bounceEasing(3) });

I think you can generate most of the code in the easing plugin automatically with this idea.

Changed June 13, 2010 06:52PM UTC by dmethvin comment:2

resolution: → invalid
status: newclosed

This would best be discussed on the forum, it's not a bug.