-
Notifications
You must be signed in to change notification settings - Fork 7
/
index.html
55 lines (49 loc) · 2.22 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
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>Zepto Range</title>
<meta name="viewport" content="width=600">
<link rel="stylesheet" href="styles.css">
<link href="//fonts.googleapis.com/css?family=Ubuntu:300,700" rel="stylesheet" type="text/css">
</head>
<body>
<div id="main">
<div class="wrapper">
<h1>Zepto Range</h1>
<p>Input range implementation to works with touch using Zepto.</p>
<p><a href="//github.com/jcemer/zepto-range">github.com/jcemer/zepto-range</a></p>
<div id="samples-01">
<input type="range" min="0" max="4" value="0">
<input type="range" class="inside" min="0" max="4" value="0">
</div>
<div id="samples-02">
<input type="range" class="inside" min="0" max="6" value="0">
</div>
<div id="samples-03">
<input type="range" min="-4" max="4" value="0">
</div>
<div id="samples-04">
<h2>Events</h2>
<input type="range" class="inside" min="0" max="2" value="1">
</div>
<script src="zepto.js"></script>
<script src="zepto-range.js"></script>
<script>
$('#samples-01 input[type="range"]').range();
$('#samples-02 input[type="range"]').range('0', '3', '6');
$('#samples-03 input[type="range"]').range('worst', 'best');
// SAMPLE 04
var sample04 = $('#samples-04 input[type="range"]');
sample04.on('change init', function (event, current, range) {
var labels = range.legend.children();
labels.removeClass('active');
labels.eq(current).addClass('active');
});
sample04.range('worst', 'normal', 'best');
</script>
</div>
<a href="//github.com/jcemer/zepto-range"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_white_ffffff.png" alt="Fork me on GitHub"></a>
</div>
</body>
</html>