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:

https://jsfiddle.net/SebastienM/1L673ukx/

change this line:

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

to:

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