Jump to content
GreenSock

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

Need help for my GSAP timeline

Go to solution Solved by akapowl,

Recommended Posts

Hello,


I have a problem with my animation, at the very first click it starts again as the menu had already been opened.

Can you help me ?


Thank you !

See the Pen wvoLwyv by PierrePerrin (@PierrePerrin) on CodePen

Link to post
Share on other sites

Hey @pierrep- - welcome to the forum.

 

You simply just forgot to set your timeline to reversed for it to work with the ternary operator in your click-function.

 

var toOpenNav = gsap.timeline({ paused: true });

vs

var toOpenNav = gsap.timeline({ paused: true, reversed: true });

 

See the Pen adf3b831a4608bd591bce96a4864b46e by akapowl (@akapowl) on CodePen

  • Like 5
Link to post
Share on other sites

@akapowl Now that you say it i feel a little silly lol thanks for your quick reply !

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.

×