|
|
@ -47,14 +47,15 @@ |
|
|
|
<script type="text/javascript"> |
|
|
|
|
|
|
|
//Pagination https://www.javaer101.com/en/article/123201810.html |
|
|
|
pageSize = 4; |
|
|
|
pageSize = 24; |
|
|
|
incremSlide = 5; |
|
|
|
startPage = 0; |
|
|
|
numberPage = 0; |
|
|
|
|
|
|
|
|
|
|
|
var pageCount = $(".browsethearchive-items").length / pageSize; |
|
|
|
var totalSlidepPage = Math.floor(pageCount / incremSlide); |
|
|
|
|
|
|
|
|
|
|
|
for(var i = 0 ; i<pageCount;i++){ |
|
|
|
$("#pagin").append('<li><a href="#">'+(i+1)+'</a></li> '); |
|
|
|
if(i>pageSize){ |
|
|
@ -98,11 +99,11 @@ slide = function(sens){ |
|
|
|
}else{ |
|
|
|
next.show(); |
|
|
|
prev.show(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
slide(); |
|
|
|
|
|
|
|
showPage = function(page) { |
|
|
|
$(".browsethearchive-items").hide(); |
|
|
|
$(".browsethearchive-items").each(function(n) { |
|
|
@ -121,11 +122,11 @@ var activeLink; |
|
|
|
|
|
|
|
$("#pagin li a").click(function() { |
|
|
|
|
|
|
|
$listItems.removeClass('current'); |
|
|
|
$(this).addClass('current'); |
|
|
|
var activeLink=$(this); |
|
|
|
$listItems.removeClass('current'); |
|
|
|
$(this).addClass('current'); |
|
|
|
var activeLink=$(this); |
|
|
|
|
|
|
|
showPage(parseInt($(this).text())); |
|
|
|
showPage(parseInt($(this).text())); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
@ -142,6 +143,7 @@ $(".prev").click(function() { |
|
|
|
showPage(--i); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
$(".next").click(function() { |
|
|
|
|
|
|
|
let nextLi = $("#pagin li a.current").parent().next().find("a"); |
|
|
|