title: Changing value attribute of radio buttons in a group using jQuery
body: <p>I have multiple dynamically added radio buttons. I want to change the value attribute of selected radio button to <code>"yes"</code> and change the radio button value to <code>"no"</code> once some other radio button is selected.</p>
  
  <pre><code>&lt;input type="radio" name="tab-active" value="no" /&gt;
  </code></pre>
  
  <p>I am able to get the value to change to <code>"yes"</code> by using the following jQuery:</p>
  
  <pre><code>$(document).on("click","input[name=tab-active]:radio",function(){
      if($("input:radio[name=tab-active]").is(":checked")) {
          $(this).val('yes');
      }
  });
  </code></pre>
  
  <p>How can I change the value attribute of the selected radio button to <code>"no"</code> once some other radio button is selected?</p>