매우 유용한 jQuery 플러그인을 발견했습니다. 다음은 link입니다. 이 코드로 설정하는 일이 있으면
:
<html>
<head>
<script src="//code.jquery.com/jquery-2.1.3.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script src="//raw.github.com/botmonster/jquery-bootpag/master/lib/jquery.bootpag.min.js"></script>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
</head>
<body>
<div id="content">Dynamic Content goes here</div>
<div id="page-selection">Pagination goes here</div>
<script>
// init bootpag
$('#page-selection').bootpag({
total: 10
}).on("page", function(event, /* page number here */ num){
$("#content").html("Insert content"); // some ajax content loading...
});
</script>
</body>
</html>
을 그런 다음이를 사용할 수 있습니다
$('.demo3').bootpag({
total: 500,
page: 3,
maxVisible: 3,
href: "#pro-page-{{number}}",
leaps: false,
next: 'next',
prev: null
}).on('page', function(event, num){
$(".content3").html("Page " + num); // or some ajax content loading...
});
이 도움이 있으면 알려주세요.
크기를 조정하려면 큰 블록의 경우 .pagination-lg, 작은 블록의 경우 .pagination-sm을 추가하십시오. –
감사합니다. 하지만 테이블 크기가 500 행 이상일 수 있으므로 크기를 조정하더라도 페이지 매김은 매우 길다. – Owner
가능한 [부트 스트랩을 사용한 표 페이지 매김이 작동하지 않습니다.] (http://stackoverflow.com/questions/40416972/table-pagination-using-bootstrap-is-not-working) – vanburen