I have this code:
var image = button.getElementsByTagName("span")[0];
if (isEnabled) {
image.style.color = "#BBB"
else {
image.style.color = "#AAA"
Can someone give me some advice on how instead of directly setting a color that I could set the button to have a 3rd class of enabled and then later set it to have a 3rd class of disabled?
Note that my button currently has classes like this:
class="fa fa-bold"
class="fa fa-arrow"
etc.
So I would need the first two classes to be unchanged. Then I need to be able to set to like this:
class="fa fa-bold enabled"
class="fa fa-bold disabled"
class="fa fa-bold enabled"
etc.