Hello guys,
I am trying to animate a menu, with two different timelines (open and close). Everything works fine.
There still one little issue I need to solve:
After closing the menu and toggle the button to open the menu, the open-animation doesn't work / run.
Here is my code:
menuIcon.addEventListener('click', MenuAnimation);
var menuState = 0;
function MenuAnimation(){
if(menuState == 0 ){
menuState = 1;
tl.play();
} else if(menuState == 1){
tl_remove.play();
menuState = 0;
}
}
Thank you in advance.
Regards
Daniel