Hi Guys,
I'm trying to animate this hamburger menu. The hover works but only once and the click doesn't work so it's not a pretty picture
Basically on click I need to draw #x_right and #x_left to 100% to form the X to close the menu and draw all the rest of the paths to 0%
What am I doing wrong?
Thank you!
See the Pen xxKdZyK by gianpiero-di-lullo (@gianpiero-di-lullo) on CodePen
The main thing that I'd change is moving the timeline animation outside of your hover and click states and make sure that the timeline is paused. If you just do that you can see your button start to work more like what you're expecting.
However, with multiple states affecting the same elements like you want, I think it makes sense to use one timeline for the whole thing but use a label as a kind of middle state to use on hover. Then when the element is clicked you "finish" the timeli