-
Notifications
You must be signed in to change notification settings - Fork 3
/
paging-demo.html
35 lines (35 loc) · 1.16 KB
/
paging-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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<title>ScrollKit Paging Demo</title>
<link rel="stylesheet" href="scrollkit.css">
<script src="jquery-1.8.0.js"></script>
<script src="scrollkit.js"></script>
<script>
$(function() {
var scrollView = $('#root-view')[0].scrollView;
scrollView.$element.bind(ScrollKit.ScrollView.EventType.PageChanged, function(evt) {
console.log('Page changed from: ' + evt.previousIndexes.horizontal + ', to: ' + evt.currentIndexes.horizontal);
});
});
</script>
</head>
<body>
<div class="sk-scroll-view" id="root-view" data-paging-enabled="true" data-always-hide-horizontal-scroll-indicator="true" data-use-mouse-drag-scrolling="true">
<ul class="sk-page-container-horizontal">
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
<li>Item 5</li>
<li>Item 6</li>
<li>Item 7</li>
<li>Item 8</li>
<li>Item 9</li>
</ul>
</div>
</body>
</html>