jenhuls
8/26/2016 - 12:46 PM

Wrap content in new content with jQuery

Wrap content in new content with jQuery

var divs = $("div > div");
for(var i = 0; i < divs.length; i+=3) {
  divs.slice(i, i+3).wrapAll("<div class='new'></div>");
}