pagination on browse the archive should be working now..

This commit is contained in:
JoBCB 2021-05-11 11:39:26 +01:00
parent 3a9c117c2d
commit b5e9ca37ba

View File

@ -46,12 +46,12 @@
<script type="text/javascript"> <script type="text/javascript">
//Pagination https://www.javaer101.com/en/article/123201810.html
pageSize = 24; pageSize = 24;
incremSlide = 5; incremSlide = 5;
startPage = 0; startPage = 0;
numberPage = 0; numberPage = 0;
//pagination slider ref https://www.javaer101.com/en/article/123201810.html
var pageCount = $(".browsethearchive-items").length / pageSize; var pageCount = $(".browsethearchive-items").length / pageSize;
var totalSlidepPage = Math.floor(pageCount / incremSlide); var totalSlidepPage = Math.floor(pageCount / incremSlide);
@ -150,7 +150,7 @@ $(".next").click(function() {
$("#pagin li a.current").removeClass("current"); $("#pagin li a.current").removeClass("current");
nextLi.addClass("current"); nextLi.addClass("current");
if (i < ($('.browsethearchive-items').length)/4) { if (i < ($('.browsethearchive-items').length)/ pageSize) {
showPage(++i); showPage(++i);
} }
}); });