Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设您有一个元素 ,$('#myDiv')正在被动画化。除了使用选项中的步骤之外,您将如何访问fx?
$('#myDiv')
fx
理想情况下,通过使用类似的东西$('#myDiv').fx?
$('#myDiv').fx
感谢 pimvdb 的有用回答。万一有人在寻找答案时偶然发现,以下代码会生成最后一个 fx 对象:
$.timers[$.timers.length - 1].anim.tweens[0]
我没有做过任何真正的测试,但似乎具有多个属性(即高度、不透明度等)的动画被转换为具有多个 fx 对象的多个动画。因此,如果您有多个动画属性,这将没有多大用处。