+ 1

My addEventListener is not working properly

When I click the hamburger, the first circle should move but it doesn't work. But if I use body.addEventListener or window.addEventListener or I call the function, it works. Or could it be the z-index I used. Even then, the hamburger is still on top. https://code.sololearn.com/WMoRB9k54wjA/?ref=app

18th Aug 2020, 9:22 AM
Fasasi Sherif
Fasasi Sherif - avatar
1 Odpowiedź
+ 2
Thanks. I've read it. It talks about event bubbling and capturing. That it can take three parameters while the third is optional. But by the way, I checked my css file and the mistake is from there due to the z-index. I removed the z-index from the nav and openNav class and it worked
18th Aug 2020, 9:40 AM
Fasasi Sherif
Fasasi Sherif - avatar