L
L
lefli2021-06-14 10:37:32
JavaScript
lefli, 2021-06-14 10:37:32

Why does the GSAP animation sometimes work incorrectly?

This happens from time to time when fast scrolling or after reloading the page if it has already scrolled to animated elements. I am very familiar with GSAP, if anyone knows how to avoid such problems, I will be grateful for a hint. Animation code in snippet

ScrollTrigger.batch(".prod_lined", {
      onEnter: (batch) =>
        gsap.from(batch, {
          stagger: 0.1,
          y: "100",
          opacity: 0,
          overwrite: true,
        }),
    });


60c707209667f848631399.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question