Otaqui.com Blog

Getting a reference to an unselected radiobutton (using jQuery)

The “change” event on a radiobutton input only fires when it becomes selected. If you want to trigger some behaviour on an unselected radiobutton, then you have to bind to the change event of the radiogroup, which you can do like so:

<ul>
  <li>
    <input id="r1" name="something" type="radio" value="basic" />
    <label for="r1">Basic</label>
  </li>
  <li>
    <input id="r2" name="something" type="radio" value="standard" />
    <label for="r2">Standard</label>
  </li>
  <li>
    <input id="r3" name="something" type="radio" value="advanced" />
    <label for="r3">Advanced</label>
  </li>
</ul>
<script>
$("input[name='inputName']").change(function(ev) {
    
});
</script>