Question

Let's say you have an element, $('#myDiv'), that is being animated. How would you access fx other than using step in options?

Ideally, by using something like $('#myDiv').fx?

Was it helpful?

Solution

Thanks to pimvdb for his helpful answer. In case anyone stumbles on this looking for the answer, the following piece of code produces the last fx object:

$.timers[$.timers.length - 1].anim.tweens[0]

I haven't done any real testing, but it seems that animations with multiple properties (ie, height, opacity, etc.) are converted into multiple animations with multiple fx objects. So this won't be of much use if you have multiple animated properties.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top