I want numbers of DIV elements with the same classes, and on load, Jquery will be able to wrap certain number of those DIV elements.
Example:
<div class="wrapper">
<div class="child"></div>
<div class="child"></div>
<div class="child"></div>
<div class="child"></div>
<div class="child"></div>
<div class="child"></div>
<div class="child"></div>
<div class="child"></div>
</div>
Then let say i want to wrap every 4 DIV elements with another div called childWrapper
Result should be:
<div class="wrapper">
<div class="childWrapper">
<div class="child"></div>
<div class="child"></div>
<div class="child"></div>
<div class="child"></div>
</div>
<div class="childWrapper">
<div class="child"></div>
<div class="child"></div>
<div class="child"></div>
<div class="child"></div>
</div>
</div>
Thanks :)