title: Setting the value of a radio button with JQuery (ASP.NET MVC)
body: <p>I have 2 "lists" of (4) radio buttons {value = "0", "1", "2", "3"} in  all lists.
  The first list needs to drive the second list (which may occur multiple times). So if an option is selected in the first list, the SAME option is selected in the second list. It sounds weird, but it has a purpose. The first list is more of a "select all" type of list, and the second list is an individual selection list(s). </p>
  
  <p>I have the value of the "selectall" list via JQuery:</p>
  
  <pre><code>$("#selectalllist").change(function() {
      var str = $('input[name=selectall]:checked').val();
      $(".radiolist").attr('checked', str);   //This is my thinking
  });
  </code></pre>
  
  <p>The current selected value is stored in the str variable, and that is seemingly correct (I used alert to tell me what is stored, and it comes up what I expect). I just need to set the value of the next set of lists. The second line of the code I thought would set the checked value of $(".radiolist") to the stored value, but it ALWAYS set the value to the last entry (value = "3").</p>
  
  <p>I'm wondering if I have the wrong attribute in the .attr('', str) call? Any thoughts?</p>
  
  <p>As requested:</p>
  
  <p>(Select All buttons)</p>
  
  <pre><code>&lt;input type="radio" id="radCurrent" name="selectall" value="0" /&gt;&lt;label for="radCurrent"&gt;Current&lt;/label&gt;
  &lt;input type="radio" id="radFuture" name="selectall" value="1" /&gt;&lt;label for="radFuture"&gt;Future&lt;/label&gt;
  &lt;input type="radio" id="radCurrentAll" name="selectall" value="2" /&gt;&lt;label for="radCurrentAll"&gt;CurrentAll&lt;/label&gt;
  &lt;input type="radio" id="radFutureAll" name="selectall" value="3" /&gt;&lt;label for="radFutureAll"&gt;FutureAll&lt;/label&gt;
  </code></pre>
  
  <p>(Listing Buttons)</p>
  
  <pre><code>&lt;input type="radio" name="selectvalue" id="Current" value="0" class="radiolist" /&gt; C
  &lt;input type="radio" name="selectvalue" id="Future" value="1" class="radiolist" /&gt; F
  &lt;input type="radio" name="selectvalue" id="CurrentAll" value="2" class="radiolist" /&gt; CA
  &lt;input type="radio" name="selectvalue" id="FutureAll" value="3" class="radiolist" /&gt; FA
  </code></pre>