Jump to content

Search In
  • More options...
Find results that contain...
Find results in...
marko krstic

tl1 on 1st click, tl2 on 2nd click

Recommended Posts

Thanks in advance. I'm wondering how to make odd and even timeline trigger on click. 

I found solutions for reverse but I would like do to something else when animation is going back.


Thats why I created tl1 and tl2 but not sure how to trigger tl1 on first click and tl2 on second.


See the Pen eYOBYgL by krstivoja (@krstivoja) on CodePen

Link to post
Share on other sites

Hi @marko krstic,


Depending on what it is you want to do, you might want to use simple tweens rather than timelines. Timelines *can* be tougher to control in this type of situation because once they play ... they're done. I say *can* because, depending on other factors, they may be just what you're looking for! Just need more info about what you'd like to accomplish.


See the Pen mdbOdqr by sgorneau (@sgorneau) on CodePen

  • Like 4
Link to post
Share on other sites

Hey @Shaun Gorneau Thanks for reply and solution.


Goal for me is to create menu navigation when I will have different animation when it's opening and when it's closing. 

That's why I imagine that with 2 timelines. 1st timeline when you are opening it and 2nd time line on closing.


Does that make sense?

Link to post
Share on other sites
7 hours ago, marko krstic said:

Thanks a lot and I still need to read a lot about gsap and differences between:
"var tl = new TimelineLite()

Maybe Jack's explanation here can help make the differences more clear. 


If there are particular points of confusion about the two, please let us know! We're happy to help.

Link to post
Share on other sites
1 minute ago, marko krstic said:

I'm really glad I bought premium package. This support it's priceless!

Haha, if that's a joke, it's a good one given I don't see any membership associated with your account :) 


The support on these forums is free! We have a group of incredibly helpful volunteers who moderate the forums for the most part. So thank them for the help that they give!

  • Like 1
Link to post
Share on other sites

Hey @ZachSaucier it's not a joke. I'm just looking on bigger picture.

They created a tool, forum and engaged people to collaborate.

That's why I'm glad I invested money in this tool and not some other one.

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