-
Notifications
You must be signed in to change notification settings - Fork 7
/
index.html
33 lines (32 loc) · 1.01 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Draggable-number.js</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<style type="text/css">
.container {
padding: 20px;
text-align: center;
}
</style>
</head>
<body>
<div class="container">
<p>Basic demo:</p>
<input class="numeric-input-1" value="42" />
</div>
<script src="src/draggable-number.js"></script>
<script>
var el = document.getElementsByClassName('numeric-input-1')[0];
new DraggableNumber(el, {
min: -42,
max: 100000,
changeCallback: function(val) {console.log("on change: " + val);},
endCallback: function(val) {console.log("on end: " + val);}
});
</script>
</body>
</html>