Bug Tracker

Opened 6 years ago

Closed 6 years ago

#12794 closed feature (wontfix)

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/.

Change History (1)

comment:1 Changed 6 years ago by Rick Waldron

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.

Note: See TracTickets for help on using tickets.