Vulpeculox home page Miscellany menu
Radio options

Demonstration

Change css Show all index values North/South/East/West Dry/Wet
Click on buttons an options

Page source

HTMLJavascript
<span id=butCss class="m2 button">Change css</span> <span id=butVals class="m2 button">Show all index values</span> <span id=wind class=RO>North/South/East/West</span> <span id=rain class=RO>Dry/Wet</span>
$(document).ready(function(){ $('#butVals').click(function(){ var vals = ReadAllRadioOptions(); var s = JSON.stringify(vals); $('#info').html(s); }); $('#butCss').click(function(){ StyleRadioOptions('span.ROon {color:red;}span.ROoff {color:green;} span.RO {cursor:help;}'); }); $('.RO').click(function(){ var ro = $(this); var id = ro.attr('id'); console.log(ro,id); $('#info').html('Clicked on ' + id + ' Index is ' + RadioOptionIx(id)); }); });

Get started

Download Save this link as... whatever
Requires jQuery But if this pains you there's not much going on so feel free to hack into native Javascript)
Note that the initialisation is done automatically for you.