Jump to content
Search Community

Possible to offset reset for scroll trigger?

Karmor test
Moderator Tag

Recommended Posts

Hello all, I'm new to GSAP and the scrolltrigger plugin and I think it's fantastic, however I've become unstuck trying to implement an idea for something and need a little assistance so any help is greatly appreciated.

 

Anyway, what I want to do is reset the triggered animation you see there in the codepen when someone scrolls up then back down the page, which is all working as intended, however, I don't want the reset to trigger while you can still see the element that gets reset. So basically, I want that reset to only happen once the green box is no longer in the viewport, how do I go about doing this?

 

Very interested in finding out the solution. Thanks a bunch!

See the Pen PoNzJZb by Karmor (@Karmor) on CodePen

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