Image Gallery - Darken/Lighten button

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! :wink:

change this line:

if (btn.getAttribute("class", "dark")) {


if (btn.getAttribute("class") === "dark") {
1 Like