The HTML code:
<input type="radio" name="theName" value="1" id="option-1">
<input type="radio" name="theName" value="2">
<input type="radio" name="theName" value="3">
The Javascript code:
$(document).ready(function(){
$('input[name="theName"]').change(function(){
if($('#option-1').prop('checked')){
alert('Option 1 is checked!');
}else{
alert('Option 1 is unchecked!');
}
});
});
In multiple radio with name "theName", detect when option 1 is checked or unchecked. Works in all situations: on click control, use the keyboard, use joystick, automatic change the values from other dinamicaly function, etc.