title: Getting all <input> data of a row that has a checked checkbox
body: <p>I've been working on this for a few days. I need help. I'm trying to loop through the whole table and get all the <code>&lt;input&gt;</code> data in that row ONLY if the checkbox in that row is checked and serializeArray them to put them in an array. Right now, if I check one checkbox it will grab all the <code>&lt;input&gt;</code> data from other rows too.</p>
  
  <p><a href="http://jsfiddle.net/h82om7sf/20/" rel="nofollow">http://jsfiddle.net/h82om7sf/20/</a></p>
  
  <pre><code>$(function()
  {
      $('#submitButton').click(function(){
  
          var data = new Array();
          var i=0;
          $('#add table').find('input[type=checkbox]:checked').each(function(){
  
              data[i] = $('#add :input').serializeArray();
              i++;
          });
  
          alert(data.toSource());
  
      });
  });
  
  
  &lt;div id="add"&gt;
          &lt;table&gt;
              &lt;tr&gt;
                  &lt;button id ="submitButton" type="button"&gt;Build&lt;/button&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td&gt;&lt;input id="name1" type="checkbox" name="name" value="checkboxValue0"/&gt;&lt;/td&gt;
                  &lt;td&gt;Id&lt;input type="hidden" name="id" value="1"/&gt;&lt;/td&gt;
                  &lt;td&gt;
                      &lt;input type="text" placeholder="Placeholder" name="address"/&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                      &lt;input type="radio" name="radioButton0" value="1" /&gt;radioButton1 1
                      &lt;input type="radio" name="radioButton0" value="2" /&gt;radioButton1 2
                  &lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td&gt;&lt;input id="name2" type="checkbox" name="name" value="checkboxValue0"/&gt;&lt;/td&gt;
                  &lt;td&gt;Id&lt;input type="hidden" name="id" value="2"/&gt;&lt;/td&gt;
                  &lt;td&gt;
                      &lt;input type="text" placeholder="Placeholder" name="address"/&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                      &lt;input type="radio" name="radioButton1" value="1" /&gt;radioButton2 1
                      &lt;input type="radio" name="radioButton1" value="2" /&gt;radioButton2 2
                  &lt;/td&gt;
              &lt;/tr&gt;
  
              &lt;tr&gt;
                  &lt;td&gt;&lt;input id="name3" type="checkbox" name="name" value="checkboxValue0"/&gt;&lt;/td&gt;
                  &lt;td&gt;Id&lt;input type="hidden" name="id" value="3"/&gt;&lt;/td&gt;
                  &lt;td&gt;
                      &lt;input type="text" placeholder="Placeholder" name="address"/&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                      &lt;input type="radio" name="radioButton2" value="1" /&gt;radioButton3 1
                      &lt;input type="radio" name="radioButton2" value="2" /&gt;radioButton3 2
                  &lt;/td&gt;
              &lt;/tr&gt;            
          &lt;/table&gt;
      &lt;/div&gt;
  </code></pre>