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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top