Jump to content



.TweenMax( target:Object, duration:Number, vars:Object ) ;



target: Object

Target object (or array of objects) whose properties should be affected. When animating DOM elements, the target can be: a single element, an array of elements, a jQuery object (or similar), or a CSS selector string like “#feature” or “h2.author”. GSAP will pass selector strings to a selector engine like jQuery or Sizzle (if one is detected or defined through TweenLite.selector), falling back to document.querySelectorAll().

duration: Number

Duration in seconds (or frames if useFrames:true is set in the vars parameter)

vars: Object

An object defining the end value for each property that should be tweened as well as any special properties likeonCompleteease, etc. For example, to tween mc.x to 100 and mc.y to 200 and then call myFunction, do this: new TweenMax(mc, 1, {x:100, y:200, onComplete:myFunction}). Below is a list of all special properties.

Show More



Copyright 2017, GreenSock. All rights reserved. This work is subject to theterms of useor for Club GreenSock members, the software agreement that was issued with the membership.