I found out what was wrong. Not sure I understand though. The .card-list were not the only elements in my row.
The $('.card-list:nth-child(3n)')
was not only counting the .card-list but also what came before, even though it didn't have the .card-list class.
I should have checked that earlier, thank you for the help by the way.
Here is what I had :
<div class="row">
<div class="col-xs-12 text-center">
<h2 class="title-bullet-small">Title</h2>
</div>
<div class="col-xs-12 list-filters">
Some forms
</div>
<div class="card-list">
Card
</div>
<div class="card-list">
Card
</div>
<div class="card-list">
Card
</div>
</div>
Here is what I had to do in order for the $('.card-list:nth-child(3n)')
to work:
<div class="row">
<div class="col-xs-12 text-center">
<h2 class="title-bullet-small">Title</h2>
</div>
<div class="col-xs-12 list-filters">
Some forms
</div>
</div>
<div class="row">
<div class="card-list">
Card
</div>
<div class="card-list">
Card
</div>
<div class="card-list">
Card
</div>
</div>