-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.html
68 lines (63 loc) · 1.92 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
68
<!doctype html>
<html>
<head>
<title>Simple-paginator-test</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<style media="screen" type="text/css">
legend {
padding-top: 20px;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-xs-12">
<legend> Simple bootstrap paginator - sample usage </legend>
</div>
</div>
<div class="row">
<div class="col-xs-8 col-xs-offset-2">
<h4> Content: </h4>
<div id="content" class="well">
<p class="text-center">Content go here! </p>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div id="pagination" class="text-center"></div>
</div>
</div>
<div class="row">
<div class="col-xs-12 text-center">
<a id= "changeTotalPages" class="btn btn-default">Change total pages to 10. </a>
<a id="changePage" class="btn btn-default">Select page 3. </a>
<a id="hide" class="btn btn-default">Hide Paginator. </a>
</div>
</div>
</div>
<script src="simple-bootstrap-paginator.js"></script>
<script>
var pag = $('#pagination').simplePaginator({
totalPages: 6,
pageChange: function(page) {
$('#content').empty().text('Page is ' + page);
}
});
$('#changeTotalPages').click(function() {
pag.simplePaginator('setTotalPages', 10);
})
$('#changePage').click(function() {
pag.simplePaginator('changePage', 3);
})
$('#hide').click(function() {
pag.simplePaginator('hide');
})
</script>
</body>
</html>