-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
52 lines (49 loc) · 1.3 KB
/
index.html
File metadata and controls
52 lines (49 loc) · 1.3 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
<!DOCTYPE html>
<html>
<head>
<title>VimVol demo</title>
<link rel="stylesheet" type="text/css" href="stylesheets/jquery-vimvol.css"></link>
<style>
body {
background: #efefef;
}
.container {
position: absolute;
margin: 0 auto;
display: inline-block;
top: 50%;
left: 50%;
margin-top: -7px;
padding: 10px 14px;
border-radius: 4px;
background: rgba(0, 0, 0, 0.15);
border: 1px solid rgba(0, 0, 0, 0.02);
box-shadow: rgba(0, 0, 0, 0.3) 1px 1px 10px 0;
}
</style>
</head>
<body>
<div class="container">
<input id="vslider" type="range" min="0" max="10" value="4" step="1" />
</div>
<script src="javascripts/jquery-1.10.2.js"></script>
<script src="javascripts/jquery-vimvol.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var slider = $('#vslider').vimvol({
height: '30px',
stickWidth: '6px',
stickPadding: '3px',
activeColor: '#d41700',
inactiveColor: 'rgba(0, 0, 0, 0.1)'
});
// Handle the volume slider dragging by hooking onto the input
// element's native change event
$('#vslider').on('change', function(e){
console.log('New volume value: ' + e.currentTarget.value);
});
$('.container').css('margin-left', $('.container').width() * -0.5);
});
</script>
</body>
</html>