title: JQuery get radio button selection
body: <p>I am trying to use JQuery and Ajax to submit a group of forms.  The forms do not always have the same number of inputs or the same names to elements.</p>
  
  <p>The code works fine for what I have with the exception of getting the values of which radio button is checked.  It always returns the value of the last radio button.</p>
  
  <p>Here is how I am getting the form data:</p>
  
  <pre><code>var values = {};
  var formdata = new FormData();
  $('form :input').each(function()
  {
      formdata.append(this.name, $(this).val());
  });
  </code></pre>
  
  <p>I have also tried:</p>
  
  <pre><code>$('form.ajax :input, form.ajax input[type=radio]:checked').each(function()
  </code></pre>
  
  <p>What is the proper way to get the values of the checked radio button?  I am hoping not to have to write a separate function for each form that I submit.</p>