0

My animation doesnt work

I wanted to make an animation for my menu, but the second one doesn't work like I would like to. It works only at first try. What is the problem? https://code.sololearn.com/WTMq5Xh5Kyy6/?ref=app

9th Nov 2022, 11:50 AM
Tomasz Smoleń
Tomasz Smoleń - avatar
1 Respuesta
+ 1
Most likely this is due to the fact that you have already set the value "anim3 1s" to animate these elements, because of this, nothing happens when they are overwritten, because the value does not change, therefore nothing should change. Try adding document.getElementById('list1').style.animation = ""; document.getElementById('list2').style.animation = ""; document.getElementById('list3').style.animation = ""; to your hidden() function
10th Nov 2022, 11:03 AM
ReQiƞ
ReQiƞ - avatar