Capítulo 358 de 411

Chapter 358: ScrollTrigger.getById

Core Idea

Returns the ScrollTrigger that was assigned the corresponding id

Key Concepts

  • id: String

Code Examples

ScrollTrigger.create({
  id: "myID",
  ...
});

// then later...
let trigger = ScrollTrigger.getById("myID");
  • What it demonstrates: typical usage of ScrollTrigger.getById in a GSAP animation.

Key Takeaways

  1. id: String