-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.html
83 lines (82 loc) · 1.57 KB
/
demo.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
*{
-webkit-user-select:none;
-moz-user-select:none;
-ms-user-select:none;
user-select:none;
}
.pagination{
margin: 50px;
padding: 20px;
border: 1px solid #136ed6
}
ul{
overflow: hidden;
display: inline-block;
padding: 0;
}
li{
float: left;
width: 40px;
height: 40px;
line-height: 40px;
margin-left: 15px;
list-style:none;
text-align: center;
border: 1px solid #000;
cursor: pointer;
}
.disabled{
color: #999;
cursor: not-allowed;
}
.page.active{
color:#fff;
background: #136ed6
}
div{
float: left;
overflow: hidden;
}
.text{
margin: 10px
}
.ellipsis{
display: none
}
.jump{
position:relative;
margin-top: 10px;
margin-left: 20px;
}
select{
margin:0 5px;
}
</style>
</head>
<body>
<div id="content">
</div>
<div class="pagination"></div>
</body>
<script src="./pagination.js"></script>
<script>
var virtualData = []
var i = 1
var total = 100
while(i < total) {
virtualData.push(i)
i++
}
var test = function(obj) {
console.log(obj)
}
var page = new Pagination({id:'.pagination', dataZone:'#content', pageSize: 15, total: total, cb: test, dataSource: virtualData})
</script>
</html>