-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
67 lines (59 loc) · 1.14 KB
/
index.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>native-Pagination</title>
<style>
ul {
list-style: none;
overflow: hidden;
}
li {
float: left;
margin-right: 3px;
}
a {
display: inline-block;
border: 1px solid #ddd;
width: 20px;
height: 20px;
text-align: center;
line-height: 20px;
cursor: pointer;
text-decoration: none;
border-radius: 3px;
color: #333;
}
li span {
display: inline-block;
height: 20px;
line-height: 20px;
text-align: center;
border: 1px solid #ddd;
border-radius: 3px;
font-size: 12px;
color: #aaa;
cursor: pointer;
}
.active {
background: green;
color: #fff;
cursor: default;
}
</style>
</head>
<body>
<ul id="pageList"></ul>
<script type="text/javascript" src="pagination.js"></script>
<script type="text/javascript">
var page = new Pagination({
id: 'pageList',
total: 21,
showButtons: 6,
callback: function (pageIndex) {
console.log(pageIndex);
}
});
</script>
</body>
</html>