Jump to content
Search Community

How to instantly apply all classes from Timeline?

kkhalilov 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

Hello.

I have a one-page site on which the landing is done through animation. transition through the navbar. when you want to go to a new page, the transition animation starts. there are 5 such pages and, accordingly, animated scenes also 5. I would like that after one viewing of the scene, when I return to it, the animation does not occur and all CSS styles from timeline are applied instantly. the problem is that each subsequent scene is associated with the previous one and you need to roll back the styles to the right moment.

tlFirstScene = new TimelineMax({paused: false}),
tlSecondScene = new TimelineMax({paused: true}),
tlThirdScene = new TimelineMax({paused: true}),
tlFourthScene = new TimelineMax({paused: true}),
tlFifthScene = new TimelineMax({paused: true});

 

Link to comment
Share on other sites

Welcome to the forums @kkhalilov

 

I'm not entirely sure I understand your question, especially without seeing anything in context in a codepen, but you have total control over the timelines - you can make one jump to the end like timeline.progress(1) or to the beginning like timeline.progress(0). 

 

If you still need help, please provide a little more context (hopefully in a super simple codepen - it doesn't need to be your whole project, just the minimum required to illustrate the concept/challenge). 

 

Happy tweening!

  • Like 2
  • 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...