I am currently using this HTML and Javascript snippet to reload a page when somebody changes the dropdown...
<select id="dropdown">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
var orderby = jQuery('#dropdown');
var str;
orderby.change(function(){
str = jQuery(this).val();
window.location.href = "http://www.example.com?variable="+str;
});
Now I am trying to change this so that it works for a radio button instead, my HTML looks like...
<input type="radio" id="1" value="1"> 1
<input type="radio" id="2" value="2"> 2
<input type="radio" id="3" value="3"> 3
These are three seperate items so I haven't been able to work out how to modify my js snippet to be compatible, can anyone help?