title: How to uncheck a single radio button if disabled by another radio?
body: <p>jQuery newbie, here. I can't get this to work. This is what I'm using to disable a radio button based on a previous radio button.</p>
  
  <pre><code>$('document').ready(function() {
      $('input[name="a"]').change(function() {
          if($(this).val() == '1') {
              $('input[name="b"]').removeAttr('disabled');
          } else {
              $('input[name="b"][value="1"]').attr('disabled','disabled');
          }
      });
  });
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>&lt;input type="radio" name="a" value="1" /&gt; A-1
  &lt;input type="radio" name="a" value="2" /&gt; A-2
  
  &lt;input type="radio" name="b" value="1" /&gt; B-1
  &lt;input type="radio" name="b" value="2" /&gt; B-2
  </code></pre>
  
  <p>So if I checked A-2, B-1 gets disabled. But say I had B-1 checked to begin with, and then I checked A-2, then I'd want B-1 to get unchecked. I've tried adding this in:</p>
  
  <pre><code>if($('input[name="b"][value="1"]').is(':disabled')) {
      $('input[name="b"][value="1"]').removeAttr('checked');
  }
  </code></pre>
  
  <p>It does the job, but it also unchecks B-2 if I had that checked first. I only want B-1 to get unchecked. (I hope this makes sense.)</p>
  
  <p>What am I doing wrong?</p>