jQuery nth / Every 3rd
<p>I've got some markup that looks like this:</p>

<pre><code>&lt;h3&gt;Mgmt&lt;/h3&gt;   
&lt;div class="ManagementOperations"&gt;bla bla &lt;/div&gt;
&lt;div class="ManagementOperations"&gt;bla bla &lt;/div&gt;
&lt;div class="ManagementOperations"&gt;bla bla &lt;/div&gt;
&lt;div class="ManagementOperations"&gt;bla bla &lt;/div&gt;
&lt;div class="ManagementOperations"&gt;bla bla &lt;/div&gt;
&lt;h3&gt;People&lt;/h3&gt;
&lt;div class="people"&gt;bla bla &lt;/div&gt;
&lt;div class="people"&gt;bla bla &lt;/div&gt;
&lt;div class="people"&gt;bla bla &lt;/div&gt;
&lt;div class="people"&gt;bla bla &lt;/div&gt;
&lt;div class="people"&gt;bla bla &lt;/div&gt;
&lt;div class="people"&gt;bla bla &lt;/div&gt;
</code></pre>

<p>The number of each divs going from 2 - 100 for both of the categories</p>

<p>I want to add the class rowEnd to every 3rd 'ManagementOperations' and every 3rd 'ManagementOperations' the count resets whn there is a change in class.</p>

<p>Any ideas? I'm using this with poor results:</p>

<pre><code>$(".ManagementOperations:nth-child(4n)").addClass('rowEnd');
</code></pre>
