Hi all,
i am trying to create a button that will toggle the background color of my webpage from white to grey and back again. so, every time the user clicks, it the backgournd it white, it will turn grey. if its grey, it will turn white.
i figured out (thanks to Tom Kenny
here ) how to change the color but i would like to add to that code a condition that checks the current background color of the website or the current background class.
i know it cannot be complicated but for some reason it got complicated for me.
can anyone help?
thanks.