Hi there,
I’m not sure why my button does not toggle from “Lighten” to “Darken”?
Is it one of the quirks of JavaScript as mentioned on this post?
Here is my code, if anybody can check it out, thanks in advance!
Hi there,
I’m not sure why my button does not toggle from “Lighten” to “Darken”?
Is it one of the quirks of JavaScript as mentioned on this post?
Here is my code, if anybody can check it out, thanks in advance!
change this line:
if (btn.getAttribute("class", "dark")) {
to:
if (btn.getAttribute("class") === "dark") {