TimelineLite: Free GreenSock Tutorial
Master Timeline Animation Sequencing with GreenSock
What You'll Master in This Tutorial
Timeline Sequencing
Learn to chain multiple tweens together without manually calculating delays. TimelineLite handles the timing automatically.
Position Parameters
Master precise timing control using absolute and relative positioning to create overlapping and staggered animations.
Labels & Navigation
Implement timeline labels for easy navigation and testing specific animation sequences during development.
No longer do you have to make sure that each tween's delay somehow matches the durations and delays of all previous tweens; TimelineLite does that for you.
Animation Sequence Breakdown
Background Fade In
Initial background opacity animation
INTO Text Slides
Text slides in from the left side
THE WIND Text Slides
Text slides in from the right side
Main Copy Rises
Body text slides up from bottom
Buttons Stagger In
Three red buttons swing in staggered
Prepare for 3D animations by adding perspective to all transformed elements. Insert this code after the variable declarations:
$progress = $(".progress"),
tl;
CSSPlugin.defaultTransformPerspective = 800;
Transform perspective creates the illusion of depth by defining the distance between the viewer and the 3D plane. A value of 800 pixels provides subtle but noticeable depth without creating jarring distortion effects. This setting will apply to all 3D-transformed elements in your animation, ensuring visual consistency across the entire sequence.
The eq() selector uses zero-based indexing and refers to the position within the jQuery object, not the DOM tree. Use eq(0) for first element, eq(1) for second element.
TimelineLite vs Manual Delays
Save and preview. The overlapping motion creates more sophisticated pacing that feels less mechanical than strict sequential timing.
Add a strategic pause before the main copy appears to create better rhythm:
.from($mainCopy, 0.8, {opacity:0, y:50}, "+=0.5")
The "+=0.5" value creates a half-second pause after the headline animations complete, giving users time to process the headline before introducing body content. This pause improves information hierarchy and reduces cognitive load.
Save and preview. Notice how the strategic pause makes the overall animation feel more thoughtful and user-friendly, rather than rushing through content presentation.
Labels allow you to jump to specific points in your timeline during development, bypassing the tedium of watching the whole animation when testing specific sequences.
Back Ease Configuration Values
Progress Bar Implementation Steps
Scale Animation
Create tween to change scaleX from 0 to 1 with left transform origin
Timeline Start Position
Set position parameter to 0 to start at timeline beginning
Dynamic Duration
Use tl.duration() method for automatic duration matching
Fade Out Effect
Add final tween to fade out progress bar when complete
Key Takeaways
