getTweensOf
getTweensOf( target:[Object | Selector text | Array], nested:Boolean ):Array
返回此时间轴内某个特定对象的补间动画。
参数
目标对象: [对象 | 选择器文本 | 数组]
表示tween的目标对象。
嵌套:布尔值
(默认值 =
true
) - 确定是否返回嵌套时间轴中的tween。如果你只想获取“顶层”的tween和时间轴,请将此参数设置为false
.
返回值 : 数组
一个Tween实例的数组。
细节
返回该时间轴中特定目标对象的所有tween。你可以传入一个包含多个目标的数组或者选择器文本。
// Get all tweens of the timeline with the target of ".myClass"
tl.getTweensOf(".myClass");
// Get all tweens of the timeline with the target of myElem, including nested timelines
tl.getTweensOf(myElem, true);