xlPaging.html
1.6 KB
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
68
69
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>分页插件-xiaoluo</title>
<style>
#page {
margin: 20px auto;
color: #666;
display: block;
text-align: center;
}
#page li {
display: inline-block;
min-width: 30px;
height: 28px;
cursor: pointer;
color: #666;
font-size: 13px;
line-height: 28px;
background-color: #f9f9f9;
border: 1px solid #dce0e0;
text-align: center;
margin: 0 4px;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
.xl-nextPage,
.xl-prevPage {
width: 60px;
color: #66CA94;
height: 28px;
}
#page li.xl-disabled {
opacity: .5;
cursor: no-drop;
}
#page li.xl-active {
background-color: #66CA94;
border-color: #66CA94;
color: #FFF
}
</style>
</head>
<body ontouchstart="" onmousemove="">
<div id="page"></div>
</body>
<script src="https://www.jq22.com/jquery/jquery-1.10.2.js"></script>
<script type="text/javascript" src="xlPaging.js"></script>
<script>
// xlPaging.js 使用方法
$("#page").paging({
nowPage: 1, // 当前页码
pageNum: 20, // 总页码
buttonNum: 7, //要展示的页码数量
callback: function (num) { //回调函数
console.log(num);
}
});
</script>
</html>