Hey all! I'm trying to create a simple script to change the background color with ScrollTrigger, but every section change the color jumps can you help me understand what am I wrong?
Thank you!!
See the Pen poReVNR?editors=0100 by stefanopeschiera (@stefanopeschiera) on CodePen
Hey @stefanopeschiera
Unfortunately you are making one of the most common ScrollTrigger mistakes; creating .to() logic issues.
Giving your ScrollTriggers proper start and end values and setting immediateRender to false makes it work much better.
See the Pen cebdcbbba329eca3c8c9d7acfd53ba7d by akapowl (@akapowl) on CodePen
Hope this helps. Happy scrolling.