Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
ladybytez

Adding multiple classes with different styling to a tween or scrolltrigger...?

Go to solution Solved by GreenSock,

Recommended Posts

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

  • Solution

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

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.
×