title: iterate multiple elements over multiple classes in jQuery
body: <p>I'm trying to iterate over 3 forms, which contain a varying number of input boxes. Within each form, the input fields have the same class. What I need to do, is have a "replicate" button so that when this is pressed, it will copy the input from one field and copy it over to each one. Here is how things are currently setup:</p>
  
  <pre><code>&lt;input type="button" class="replicate" /&gt;
  
  &lt;form class="1"&gt;
    &lt;input class="1_size" /&gt; &lt;!--this is the one I want to copy to all other fields --&gt;
  &lt;/form&gt;
  &lt;form class="1"&gt;
    &lt;input class="1_size" /&gt;
  &lt;/form&gt;
  
  &lt;form class="2"&gt;
    &lt;input class="2_size" /&gt;
  &lt;/form&gt;
  &lt;form class="2"&gt;
    &lt;input class="2_size" /&gt;
  &lt;/form&gt;
  &lt;form class="2"&gt;
    &lt;input class="2_size" /&gt;
  &lt;/form&gt;
  
  &lt;form class="3"&gt;
   &lt;input class="3_size" /&gt;
  &lt;/form&gt;
  &lt;form class="3"&gt;
    &lt;input class="3_size" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>So what I need to do [when the replicate button is pressed] is to iterate over each form and use the input from the first one (see the comment) and copy it to all the other inputs in all the other forms. Is this even possible? The reason that there are forms with same classes and inputs is because they have a <code>"+"</code> and <code>"-"</code> button</p>
  
  <p>I'm using the jQuery library and I'm thinking I can do something like:</p>
  
  <pre><code>$(document).ready(function() {
      $('.1, .2, .3').each(function() {
  
      });
  });
  </code></pre>
  
  <p>Could I then use something like <code>.parents()</code> or <code>parent()</code>? I'm a little stuck and not even sure if you can use an <code>each()</code> like this...hope I've explained this well!</p>