Code
When ever I try to use the Clear/Equals button it doesn’t work. It does nothing, there isn’t even an error.
Because the conditions if (classes === 'clear')
and if (classes === 'equals')
are never satisfied.
If you do a console.log(classes)
you can see you’re getting a string of either equals c-hand
or clear c-hand
.
You can either use classes.includes()
or assign and use an id
to the elements.
I don’t think I did it properly. classes.includes needs Jquery I think.