Jump to content

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

Having trouble restarting TimelineMax on button click

Recommended Posts

Hi, so with the help of you guys, I was able to create something, but I'm still stuck on one small thing, I can't seem to restart the animation when clicked by a button, after clicking the second button, when the first button is clicked(in the pen), the animation just slows down, and text overlaps each other, any help would be really appreciated, thanks again!

See the Pen VGOYjb by goprime (@goprime) on CodePen

Link to comment
Share on other sites

I'm not really sure what should be happening here, but you're creating your timeline every time you click the section 1 button. This is causing overwrites and everything will look funky. I think you meant to make the master a global variable and restart it on click. Please make these changes to the end of your code.





Happy tweening.

  • Like 6
Link to comment
Share on other sites

nice work, mikel! Solves the problem with very little code. The design is cool too!

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