Share Posted April 22, 2022 Hi guys, I'm using ScrollTriger and trying to add/remove properties, just like toggleClass do with classes but instead classes, I want to add/remove props, what special prop of scrollTriger can I use? I'm using styled-components. Link to comment Share on other sites More sharing options...
Solution Solution Share Posted April 22, 2022 Welcome to the forums @Vinicius Eidy You can use your ScrollTrigger's callbacks like onEnter, onLeave, onEnterBack, and onLeaveBack to custom whatever you want. It's very similar to this answer. @akapowl is changing the classList property of an element. Same basic concept. 2 1 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