kf420 Posted June 3, 2020 Share Posted June 3, 2020 I'm trying to change sticky header color based on whether it's over light section or dark. It seems to be working on down scroll and when scrolling up and down over individual sections, but once the page is scrolled all the way to the bottom the header doesn't animate when scrolling back up. What am I doing wrong? See the Pen gOPOxRg by kf420 (@kf420) on CodePen Link to comment Share on other sites More sharing options...
Shaun Gorneau Posted June 3, 2020 Share Posted June 3, 2020 Hi @kf420, pretty cool way of using ScrollTrigger! The only thing you have to change is the third toggleAction ... to play. Those toggle positions are Enter from bottom ... leave the top ... come back in from top ... scroll all the way back to before start See the Pen ZEQEqjb by sgorneau (@sgorneau) on CodePen Happy tweening! Shaun 6 Link to comment Share on other sites More sharing options...
kf420 Posted June 3, 2020 Author Share Posted June 3, 2020 Thank you so much! 1 Link to comment Share on other sites More sharing options...
Shaun Gorneau Posted June 5, 2020 Share Posted June 5, 2020 You're very welcome, @kf420! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now