Jump to content
GreenSock

dbj

Calendar with 12 different timelines/steps. Not sure which way is correct.

Recommended Posts

Hello, I've been trying to make this calendar pen that has a different timeline for each month, and the user can click through the months and see the different animations.

 

At first I tried creating a separate timeline for each month, and calling it from the master timeline, but then I was having problems with tweening between two timelines and being able to reverse.

 

So I found out that I should rather be using one timeline with 12 markers, and using tweenFromTo to switch between them.

 

As you can see from my demo I'm not there yet... but I might be pretty close. I know it has to do with me being terrible at "clever" JavaScript but I'm a designer-trying-to-code kinda guy, so be gentle!

 

Am I close with my code, or is there a much better way that I'm not figuring out?

 

Thanks,

David

See the Pen f0f7825dc02b6f9e6547fd4d6839cd71 by dbj (@dbj) on CodePen

Link to comment
Share on other sites

Thanks Diaco, that will get me going!

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