Say I make a function that on-click changes div color,
is there a function that on another click, restores the div to it’s default or previous color, before the change?
(without having to specify what was the previous color)
Say I make a function that on-click changes div color, is there a function
Share
You can use .toggleClass() to add/remove a CSS class, and specify the color in your CSS.