Chapter 57: Timeline.isActive()
Core Idea
isActive() reports whether the playhead is currently moving across this timeline's span, and neither it nor any ancestor timeline is paused.
Key Concepts
- Before start or after finish: not active.
- Paused, or nested inside a paused ancestor: not active.
- Playhead exactly on the start time: counts as active.
gsap.globalTimeline.isActive() is always true.
Code Examples
if (tl.isActive()) { /* currently animating */ }
Connects To
- Timeline.progress() / totalProgress(): numeric alternatives that don't factor in paused state or ancestor timelines.