Skip to main content

killTweensOf

killTweensOf( targets:Selector text | Array | Object, props:String, onlyActive:Boolean ) : Timeline

Kills all of the tweens inside this timeline that affect the provided targets. You can optionally specify specific properties that you want killed.

Parameters

  • targets: Selector text | Array | Object

    The target object(s) whose tweens should be killed.

  • props: String

    A comma-delimited list of property names to kill (optional). If null, all properties will be killed.

  • onlyActive: Boolean

    If true, only active (in-progress) tweens will be affected.

Returns : Timeline​

self (for easy chaining)

Details​

Kills all of the tweens inside this timeline that affect the provided targets. You can optionally specify specific properties that you want killed. For example:

// 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");