+ 1
Having trouble with my code
I am currently trying to make a side menu but I have ran into an issue yet I don’t have a solution. If anyone can look over my code and help me out it will help a lot. Link to the code: https://code.sololearn.com/WLWn9A9YunLd/#
1 Respuesta
+ 6
The classList was written classlist, fix the case and add style name as argument:
Object.classList.toggle(<style_name>)
https://developer.mozilla.org/en-US/docs/Web/API/Element/classList
I guess the toggle button will be better outside of sidebar div, so when sidebar pops the toggle button remain at its position.
Hth, cmiiw