title: Get Value of Radio button group
body: <p>I'm trying to get the value of two radio button groups using the jQuery syntax as given below. When the code below is run I get the value selected from the first radio button group twice instead of getting the value of each individual group.</p>
  
  <p>Am I doing something obviously wrong here? Thanks for any help :)</p>
  
  <pre><code>&lt;a href='#' id='check_var'&gt;Check values&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;
  &lt;script&gt;
    $('a#check_var').click(function() {
      alert($("input:radio['name=r']:checked").val()+ ' ' +
            $("input:radio['name=s']:checked").val());
    });
  &lt;/script&gt;
  Group 1&lt;br/&gt;
  &lt;input type="radio"  name="r" value="radio1"/&gt; radio1
  &lt;input type="radio"  name="r" value="radio2"/&gt; radio2
  &lt;br/&gt;&lt;br/&gt;
  Group 2&lt;br/&gt;
  &lt;input type="radio"  name="s" value="radio3"/&gt; radio3
  &lt;input type="radio"  name="s" value="radio4"/&gt; radio4
  </code></pre>