Jump to content
Search Community

Use ScrollTrigger scrub to affect onEnter callback function

cotton test
Moderator Tag

Go to solution Solved by SteveS,

Recommended Posts

Hello

 

I'm trying to change the background colour of an element (site_wrapper) based on the data-attr of another element (section) that is scrolling.

I've got it all working but would like to have the scrub affect the colour change rather than just animating the change onEnter.

 

Any pointers would be much appreciated.

 

 

See the Pen KKoJVaL by Cottonltd (@Cottonltd) on CodePen

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...