pierrep- Posted March 18, 2021 Share Posted March 18, 2021 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 comment Share on other sites More sharing options...
Solution akapowl Posted March 18, 2021 Solution Share Posted March 18, 2021 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 5 Link to comment Share on other sites More sharing options...
pierrep- Posted March 18, 2021 Author Share Posted March 18, 2021 @akapowl Now that you say it i feel a little silly lol thanks for your quick reply ! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now