Skip to main content

Bug Tracker

Side navigation

#12794 closed feature (wontfix)

Opened October 26, 2012 06:30PM UTC

Closed October 26, 2012 06:50PM UTC

Support easing callbacks, instead of only strings

Reported by: david71rj Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.2
Keywords: Cc:
Blocked by: Blocking:
Description

Currently easings args accept only strings (

.animate()
for instance). The idea is to support callbacks. So you not need set your easing to public.

  var my_easing = function(a, b, c, d, e) { ... }
  el.animate(..., my_easing);

I guess that the problem can be the conflict between the complete callback and the easing callback. Javascript can check the callback args length.

Easings have 5 args, and complete callback no one.

So maybe it can be done: http://jsfiddle.net/3Zh36/.

Attachments (0)
Change History (1)

Changed October 26, 2012 06:50PM UTC by rwaldron comment:1

resolution: → wontfix
status: newclosed

Function.prototype.length is meaningless in a language that allows variable arity calls to functions with defined formal parameters.

jQuery provides jQuery.easing as a place to hang your custom easing functions.