-
Notifications
You must be signed in to change notification settings - Fork 0
/
apl.html
42 lines (34 loc) · 1.04 KB
/
apl.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>pagination example</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/paginationjs/2.1.4/pagination.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/paginationjs/2.1.4/pagination.css"/>
</head>
<body>
<div>
<section>
<div id="data-container"></div>
<div id="pagination"></div>
</section>
</div>
<script>
let arr = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$(function () {
let container = $('#pagination');
container.pagination({
callback: function (arr, pagination) {
var dataHtml = '<ul>';
$.each(arr, function (arr, item) {
dataHtml += '<li>' + item.name + '</li>';
});
dataHtml += '</ul>';
$("#data-container").html(dataHtml);
}
})
})
</script>
</body>
</html>