Looking to create Yes/No buttons that start with a default state of null and change color when pressed - green for yes, red for no.
Check out this example code:
<label class="formheading">Apparatus group is correct</label>
<fieldset data-role="controlgroup" data-type="horizontal" data-mini="false" class="right">
<input type="radio" name="q2" id="q2y" value="Yes">
<label for="q2y">Yes</label>
<input type="radio" name="q2" id="q2n" value="No">
<label for="q2n">No</label>
</fieldset>
Here's my jsfiddle - currently the button turns green for all selections, but I want it to turn red when "No" is clicked.
I've come across some similar solutions, however none seem compatible with JQM 1.4.2