If there are only two radio buttons
$('#toggler').click(function() {
$('input[type="radio"]').not(':checked').prop("checked", true);
});
Demo: Fiddle
If there are more than 2 elements
var $radios = $('input[type="radio"][name="speeds"]')
$('#toggler').click(function() {
var $checked = $radios.filter(':checked');
var $next = $radios.eq($radios.index($checked) + 1);
if(!$next.length){
$next = $radios.first();
}
$next.prop("checked", true);
});
Demo: Fiddle
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…