title: Select a group of elements and assign a class with jQuery
body: <p>So what I'm trying to do is break a form into different sections, and show/hide using jQuery.
  I have something like this:</p>
  
  <p>I can't change this:</p>
  
  <pre><code>&lt;div class="form_row"&gt;&lt;/div&gt;
  &lt;div class="form_row"&gt;&lt;/div&gt;
  &lt;div class="form_row"&gt;&lt;/div&gt;
  &lt;div class="form_row"&gt;&lt;/div&gt;
  &lt;div class="form_row"&gt;&lt;/div&gt;
  &lt;div class="form_row"&gt;&lt;/div&gt;
  &lt;div class="form_row"&gt;&lt;/div&gt;
  &lt;div class="form_row"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>With jQuery I would like to select the first 4 divs and assign a class 'sec_1' to those divs and 'sec_2' to the last four.</p>
  
  <p>I've tried doing something like this:</p>
  
  <pre><code>$('form_row').get(0).addClass("sec_1");
  $('form_row').get(1).addClass("sec_1");
  $('form_row').get(2).addClass("sec_1");
  $('form_row').get(3).addClass("sec_1");
  $('form_row').get(4).addClass("sec_2");
  $('form_row').get(5).addClass("sec_2");
  $('form_row').get(6).addClass("sec_2");
  $('form_row').get(7).addClass("sec_2");
  </code></pre>
  
  <p>But that didn't work. Any ideas?</p>
  
  <p>Thanks a lot!
  A.</p>