최신글 페이징 질문입니다.
본문
위 스킨을 사용했는데요,,
위에껀 한 페이지당 5개만 표시되더라구요,,
근데 저는 8개씩 표시하고싶어서요..
$(function() {
$(".list_page + div > p > span:last-child").text(Math.ceil($(".list_page").children("li").size()/5));
$(".list_page > li").slice(0,5).addClass("on");
$(".list_page > li:nth-of-type(5n)").addClass("5n");
$(".list_page + div > button").click(function() {
var nav_list = $(this).parent("div").prev(".list_page");
if($(this).is(":last-child")) {
if(!$(nav_list).children("li:last").hasClass("on")) {
$(nav_list).children("li.on:last").nextUntil(".5n").addClass("on").next(".5n").addClass("on");
setTimeout(function() {
$(nav_list).children("li.on:first").removeClass("on").nextUntil(".5n").removeClass("on").next(".5n").removeClass("on");
});
var paging = ($(nav_list).children("li.on:last").index()+1)/5;
$(this).siblings("p").children("span:first-child").text(Math.ceil(paging));
}
}
else {
if(!$(nav_list).children("li:first").hasClass("on")) {
$(nav_list).children("li.on:first").prev(".5n").addClass("on").prevUntil(".5n").addClass("on");
setTimeout(function() {
$(nav_list).children("li.on:last").removeClass("on").prevUntil(".5n").removeClass("on");
});
var paging = ($(nav_list).children("li.on:first").index()+1)/5;
$(this).siblings("p").children("span:first-child").text(Math.ceil(paging));
}
}
return false;
});
});
<?php
echo latest("theme/schedule", 'blog', 100, 25);
?>
제가 사용한 코드는 위와 같습니다.. ㅠㅠ 모르겠어요
!-->
답변을 작성하시기 전에 로그인 해주세요.