Toggle light & dark mode on and off not working
My Javascript is not working. I am using css variables to implement light & dark mode in my portfolio website. But for some reason, I am not able to make my js function work. Any help?
Here's my code
https://codepen.io/Abdiel-Peguero/pen/xxBxEoz
3 Replies
you're missing a closing quote on line 36 (and it's probably bad practice to use Dark and light (capitalized and not))
and the
icon
variable isn't definedyou've also got a typo, using <di> instead of <div> for
.menu-and-connectbtn
, not that that would cause this problem