سؤال

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