Hello amazing people!
I have a container with 52 small boxes and one large box containing a letter. The smaller boxes are arranged around the larger one using CSS grid, and when hovered over, they turn light grey.
My Objective
When any of the 52 small boxes are clicked, the background should first turn green. If clicked again on the same box, it should turn red. While the color is red or green, the hover effect (grey) should be disabled. Clicking for a third time will reset the background to white, re-enabling the grey hover option. Additionally, each box has a data property called "defaultWhite" that I want to change to red or green or back to defaultWhite upon clicking, as the data will later be exported to an excel document.
As I plan to export this data, any assistance in achieving the desired color changes and data updates while clicking would be greatly appreciated! :)