logo
Course

Scrubbing the Animation

So far, we’ve used ScrollTrigger to start our animation when the .box enters the viewport. But it still plays like a normal animation, once it starts, it goes at its own speed, ignoring the scroll position. 🤔 What if we want the animation to sync directly with our scrolling? That’s where the idea of scrubbing comes in! ## What is Scrubbing? Imagine scrolling down a page with a timeline of events. As you scroll, each event fades in smoothly, one after another. When you scroll back up, they fade out in reverse order, no buttons to click, just a story that follows your finger’s path.

The rest of this lesson is waiting.
Join JS Mastery Pro to unlock it.

Web Animations Full Course | Build a GTA VI Website & Master GSAP

Web Animations Full Course | Build a GTA VI Website & Master GSAP

$599

Buy the Course Only
  • Lifetime access to this course

  • Build advanced web app

  • Certificate of completion included

  • Great for focused learners who just want this course

  • gsap
    javascript
    nextjs
    react native
    threejs

    Get Full Access

    $149 /month

    Lock in a year & save—2 months free!

  • Access to all courses

  • Quizzes, mini-challenges, AI summaries, inline sandboxes

  • Participation in a private community

  • Build real production-grade apps

  • Mock interviews & project reviews

  • Weekly live sessions & member-only access