changed pagination current to middle

This commit is contained in:
JoBCB 2021-05-14 21:54:21 +01:00
parent 688030d85b
commit 274a107043

View File

@ -57,9 +57,10 @@ const slideRange = Math.floor(totalSlidePage / 2);
slide = function() {
startPage = $("#pagin li a.current").parent().index();
let paginationStart = (startPage - slideRange) < 0 ? 0 :
let paginationStart = (startPage - slideRange) <= 1 ? 0 :
(startPage >= (pageCount - slideRange) ? (pageCount - totalSlidePage) :
(startPage - slideRange));
(startPage - slideRange - 1));
$("#pagin li").hide();
for (let t = paginationStart; t < (paginationStart + totalSlidePage); t++) {