How to select every third element with jquery?
<p>I'm using Bootstrap 3 and styling a card list. The cards have different heights according to their content. I want to add a div.clearfix after every third card.</p>

<pre><code>&lt;div class="col-xs-12 col-sm-6 col-md-4 card-list"&gt;
Card here
&lt;/div&gt;
&lt;div class="col-xs-12 col-sm-6 col-md-4 card-list"&gt;
Card here
&lt;/div&gt;
</code></pre>

<p>Problem is I can only manage to get the third, but not the sixth, etc.</p>

<pre><code> $('.card-list:nth-child(5)').after('&lt;div class="clearfix"&gt;&lt;/div&gt;');
</code></pre>