2
Assuming I have 4 Divs whose class is "block". With jQuery would like to divide the Divs into blocks of 2, and "encompass" each set of "blocks" within another div.
I would like to make the code very dynamic, so that when adding several "blocks" automatically the jQuery divide and enter the div of contention.
EX::
Before the split
<div class="bloco"></div>
<div class="bloco"></div>
<div class="bloco"></div>
<div class="bloco"></div>
After the "split"
<div class="contain">
<div class="bloco"></div>
<div class="bloco"></div>
</div>
<div class="contain">
<div class="bloco"></div>
<div class="bloco"></div>
</div>
Great code! I just need to understand which was the "magica" ai! I never used these "each, Parent, hasClass"
– ivan veloso