title: jQuery :odd or :even to addClass up to a certain selector?
body: <p>I need to add an alt class (on odd or even) to a selector, and then start fresh again after it reaches another selector.</p>
  
  <p><strong>What I have</strong></p>
  
  <pre><code>&lt;div class="person"&gt;&lt;/div&gt;
  &lt;div class="person"&gt;&lt;/div&gt;
  &lt;div class="person"&gt;&lt;/div&gt;
  &lt;div class="person"&gt;&lt;/div&gt;
  &lt;div class="person"&gt;&lt;/div&gt;
  &lt;div class="section-separator"&gt;&lt;/div&gt;
  &lt;div class="person"&gt;&lt;/div&gt;
  &lt;div class="person"&gt;&lt;/div&gt;
  </code></pre>
  
  <p><strong>What I need</strong></p>
  
  <pre><code>&lt;div class="person"&gt;&lt;/div&gt;
  &lt;div class="person alt"&gt;&lt;/div&gt;
  &lt;div class="person"&gt;&lt;/div&gt;
  &lt;div class="person alt"&gt;&lt;/div&gt;
  &lt;div class="person"&gt;&lt;/div&gt;
  &lt;div class="section-separator"&gt;&lt;/div&gt;
  &lt;div class="person"&gt;&lt;/div&gt;
  &lt;div class="person alt"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>The issue I run into is it wants to keep counting odd/even from the previous section and not start over again, so my styles do no apply correctly. My current jQuery is <code>$('.personbox:odd').addClass('alt');</code></p>