Is it possible to keep the color removed after pressing the 1st play SVG, while having two other colors switch back and forth between each other? https://jsfiddle.net/x0pu2c31/
The current colors are Blue. Once one is pressed, I want the colors to switch between Green & Orange.
In the existing code, the colors change between Blue & Green. How can I remove Blue and make the colors switch between Green & Orange once Blue is removed?
Desired behavior:
- If Blue is pressed, the color should switch back to Green.
- If Green is pressed, the color should become Orange.
- If Orange is pressed, the color should go back to Green.
- Once you click on the play SVG, then close the page by clicking 'X' and return.
.played {
fill: green;
}
function markAsPlayed(played) {
played.classList.toggle("played");
}