djdutchy Posted August 8, 2020 Share Posted August 8, 2020 My gsap menu works fine. The problem is, when I click any other "<a href>" on the page, the menu will open too. You can check my codepen. I don't know, how to solve this. Can you please help me. It includes Chrome, Firefox. Not tested in IE. Thanks in advance See the Pen oNxXXdy by DJdutchy (@DJdutchy) on CodePen Link to comment Share on other sites More sharing options...
PointC Posted August 8, 2020 Share Posted August 8, 2020 Hi @djdutchy Welcome to the forum That's what I would expect to happen because you have two listeners. One for the button and one for any <a> tag. They both reverse the timeline. You could just remove the second one and the menu would open and close only with the toggle button. Also note that you're using the new GSAP 3 files, but the old GSAP 2 syntax. You may want to take a look at the GSAP 3 Migration Guide. Happy tweening and welcome aboard. 2 Link to comment Share on other sites More sharing options...
djdutchy Posted August 8, 2020 Author Share Posted August 8, 2020 Ok thank you and I will have a look. Link to comment Share on other sites More sharing options...
djdutchy Posted August 8, 2020 Author Share Posted August 8, 2020 Should I close the topic ? Link to comment Share on other sites More sharing options...
PointC Posted August 8, 2020 Share Posted August 8, 2020 Nope. It's fine. Maybe it'll help someone in the future. Let us know if you have any GSAP related questions. Happy tweening. 2 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