I like it.
Looks neat and even modern Light/dark theme support.
Here some advices for your JS code:
Take a look at the classList property.
It’s a cleaner way to work with class dynamic/toggling since it handles classes “array-like” and also offer methods like toggle.
Additionally you might not wanna use innerHTML to change only the text as it might cause unwanted behaviour. Use innerText instead.
I like it.
Looks neat and even modern Light/dark theme support.
Here some advices for your JS code:
Take a look at the classList property.
It’s a cleaner way to work with class dynamic/toggling since it handles classes “array-like” and also offer methods like
toggle
.Additionally you might not wanna use
innerHTML
to change only the text as it might cause unwanted behaviour. Use innerText instead.Oooh! Thank you so much! I knew there was a toggle somewhere but I wasn't sure, I should've Google'd it.
Code should be updated now. Thank you for your help! 😁
Still using className in the body variable