Jump to content
Search Community

jevinsidhu

Members
  • Posts

    4
  • Joined

  • Last visited

jevinsidhu's Achievements

  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

6

Reputation

  1. I figured it out! By using the `eventCallback` I could toggle the home menu after the reverse was completed. If anyone is wondering exactly how I did this, here's a codesandbox: https://codesandbox.io/embed/gsap-fix-using-eventcallback-ir40h
  2. I rewrote it following a similar approach to the post @Rodrigo linked, however I'm experiencing another issue when one submenu is open and must be reversed before the other one opens. For example, click ONE, then SEVEN or SEVEN, then ONE. https://codesandbox.io/embed/gsap-test-uct1n
  3. I'm trying to create a Navbar with animations that are controlled by GSAP Timelines and managed by React state. Most of it works great, but I run into a problem when elements in my nav bar are selected in these two orders: ONE, SEVEN, SIX SEVEN, ONE, SIX So two subheadings in a order and then anything else. It seems as if, when we reverse the second timeline, it also plays the first timeline along with it. This leads to the navbar staying open or expanded rather than closed with both timelines reversed. Not sure why this happens? However, when checking to see what Timeline fires (by naming the .data property), it appears that the correct timeline is being triggered. Please see my code sandbox here: https://codesandbox.io/embed/gatsby-starter-default-xvbk9
×
×
  • Create New...