Jump to content
Search Community

Change variable in reversed timeline

chrisk2020 test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hi,

I'm working on a sliding panel animation that will either slide to '50%' or '100%' depending on which class the trigger element has. I'm trying to be as DRY as possible, so would like to use a single timeline and pass in a variable of whether the animation should go to half or full. Because the animation toggles it would then also need to toggle back from the correct position

 

what I have so far is in the codepen link. Will I need to get/ set the position to make the toggle work? How can I pass in the variable to the timeline in the first place - especially given it's reversed/ not reversed state?

 

Thanks in advance.

See the Pen LbPNOM by chrisk2020 (@chrisk2020) 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...