Radio Button color change JavaScript - To change based on selection
I have a Radio Button Group with 2 choices(Group1) - a Yes and a No radio buttons. I would like for the color to change based on the which one is selected. When the No button is check, it should be Green and Yes should be white. When the Yes button is selected, it should be Red and the No should be white.
I have this currently entered in the mouse up
event.target.fillColor = event.target.value=="Off" ? color.white : color.red;
But it changes both of the buttons. ot the color choice of the button that is chosen.
Any help would be appreciated. Thank you!
