Jump to content
Search Community

Is there something like "onLeave up" in GSAP?

_josch test
Moderator Tag

Go to solution Solved by _josch,

Recommended Posts

Hello, thanks for taking the time to read this post! 

The animation is working perfectly the first time it's played. When the user scrolls into the section for the first time, the title is revealed through opacity. However, once the user has scrolled past the section once, the title's opacity is permanently visible. Toggling it via toggleClass would not be possible because that would override my fade-out animation at the end.

The animation for you to see: https://gyazo.com/a039115c24884cd24e12cf45fac2ff97

 

The class of "title-vis" (means title is visible) should only be removed, if the user scrolls above the section again.

Is there a function to make that happen in GSAP? Didn't find anything like that on the Forum. 

animations.PNG

css.PNG

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