Create number pagination in custom module using jQuery
DEMO =============================== https://info.boosterthon.com/design/design-archive/school-names-logos/ https://boosterspiritwear.com/design/design-archive/school-names-logos/ HTML =============================== <div class="col-wrapper"> <div class="col-group"></div> <div class="col-group"></div> <div class="col-group"></div> <div class="col-group"></div> </div> JS =============================== //=== wrap in page section var divs = $(".col-wrapper .col-group"); for(var i = 0; i < divs.length; i+=32) { divs.slice(i, i+32).wrapAll("<div class='page'></div>"); } $('.col-wrapper > .page').each(function(i){ i = i + 1; $(this).addClass('page'+i) }); //=== generate page count var totalLength = $('.col-wrapper > .page').length; var pages = totalLength; if( ...