Capítulo 343 de 411

Chapter 343: .pin

Core Idea

[read-only] The pin element (if one was defined). If selector text was used, like ".pin", the pin will be the element itself (not selector text)

Code Examples

let st = ScrollTrigger.create({
  trigger: ".trigger",
  pin: ".pin",
  start: "top center",
  end: "+=500",
});

console.log(st.pin); // pin element (not selector text)
  • What it demonstrates: typical usage of .pin in a GSAP animation.

Key Takeaways

  1. [read-only] The pin element (if one was defined). If selector text was used, like ".pin", the pin will be the element itself (not selector text)