Capítulo 80 de 411

Chapter 80: Timeline.scrollTrigger

Core Idea

scrollTrigger gives direct access to the ScrollTrigger instance associated with this timeline, when one exists.

Key Concepts

  • Only present if the timeline was created with a scrollTrigger config; undefined otherwise.

Code Examples

let tl = gsap.timeline({ scrollTrigger: { trigger: ".section", start: "top top" } });
tl.scrollTrigger.refresh();

Connects To

  • ScrollTrigger plugin: full API reference for what this property exposes.