Jump to content
Search Community

OnEnter m, OnLeave

Али К test
Moderator Tag

Go to solution Solved by ZachSaucier,

Recommended Posts

  • Solution

Hey Ali. A function call is just a function call. You can't reverse a function call. Additionally it doesn't make much sense to use two timelines to do what you're doing - you should probably just use one timeline.

 

Often times it's best to not rely on class names and CSS transitions for your animations. Using GSAP for all of your animation will give you far more control and keep all of your animations in a central location. Animating everything with GSAP will also prevent you from making some logical errors/creating conflicts. 

 

With that being said, if all you want to do is toggle multiple classes with a ScrollTrigger along with some pinning I would set it up this way:

See the Pen XWjLoKV?editors=0010 by GreenSock (@GreenSock) on CodePen

 

If that's not what you're trying to do, please make a new demo that reflects more closely what you're trying to do.

  • Like 3
  • Thanks 1
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...