ladybytez Posted August 1, 2021 Share Posted August 1, 2021 How can we add two different styles but happening at the same time to scrollTrigger onEnter / on Leave function? for example: onEnter: () => gsap.to('.text-1', {color: 'black'}) gsap.to('.text-2', {color: 'red'}), I tried this but it doesnt work. Whats the best way for this problem? Link to comment Share on other sites More sharing options...
Solution GreenSock Posted August 2, 2021 Solution Share Posted August 2, 2021 Works great for me: See the Pen 677303d793832a7ac60b59e19104ecbc by GreenSock (@GreenSock) on CodePen This is why it's so important to provide a minimal demo - it's very difficult to troubleshoot when we can't see the issue in context. If you're still having trouble, please provide a minimal demo and we'd be happy to take a peek. 👍 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