'); var blogdivs = $(".blogs"+page+" .article"); for (var i = 0; i < blogdivs.length; i += 4) { blogdivs.slice(i, i + 4).wrapAll("
"); } page++; } else { $('.btn-more-holder .btn-primary').hide(); } }) }) }) var blogdivs = $(".blogs-list .article"); for (var i = 0; i < blogdivs.length; i += 4) { blogdivs.slice(i, i + 4).wrapAll("
"); }