killTweensOf
killTweensOf( targets:Selector text | Array | Object, props:String, onlyActive:Boolean ):Timeline
销毁此时间轴内影响所提供的targets
的所有补间动画。你可以选择性地指定你想要销毁的特定属性。
参数
targets: 选择器 文本 | 数组 | 对象
目标对象(多个),其补间动画应该被终止。
props:字符串
要终止的属性名称的逗号分隔列表(可选)。如果为 null,则所有属性都会被终止。
onlyActive:布尔值
如果
true
,仅影响当前活动的(进行中的)补间动画。
返回值:时间线(Timeline)
self(便于链式调用)
细节
销毁此时间轴内影响所提供的targets
。你可以选择性地指定想要终止的特定属性。例如:
// kills all the tweens of elements with the class of "box"
tl.killTweensOf(".box");
// kills only animations of "x" and "y" properties of elements with the class of "box"
tl.killTweensOf(".box", "x,y");