jQuery动画是否检测动画? [英] jQuery animation detect if animating?
本文介绍了jQuery动画是否检测动画?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
它们是一种检测元素是否处于动画状态或检测元素值是否正在变化的方法吗?
Is their a way to detect if an element is animating or detect if values of an element is changing?
因为如果某个元素是动画,则需要触发一个函数动画。
Because I need to trigger a function if an element is animating. Not onComplete of animate.
推荐答案
当选定的元素处于动画状态时,以下返回true: > p>
The following returns true when the selected element is animating:
var isAnimating = $("#someid").is(':animated');
更多详细信息:
http://api.jquery.com/animated-selector/
和/或
http://api.jquery.com/animate/
step :在动画的每个步骤之后都要调用的函数。
http://api.jquery.com/animated-selector/
and/or
http://api.jquery.com/animate/
step: A function to be called after each step of the animation.
这篇关于jQuery动画是否检测动画?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文