-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrange.html
More file actions
40 lines (35 loc) · 857 Bytes
/
range.html
File metadata and controls
40 lines (35 loc) · 857 Bytes
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
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>DAM range demo</title>
</head>
<body>
<h1>DAM range demo</h1>
<p>DAM comes with a range widget. This widget provides a slider, a textbox, and two buttons,
any of which can be used to adjust a numeric value within a range.</p>
<div id="installation"></div>
<script src="../dist/dam-plus-widgets-0.2.js"></script>
<script>
var div=DAM.maker("div"),button=DAM.maker("button");
var range = DAM.makeRange({
title: "Fudge factor",
min: 0,
max: 100,
value: 50,
onchange: function(v) {
console.log(v);
}
})
document.getElementById('installation').appendChild(
div(
div(range),
div(
button(
"Programatically set value to 33",
{ onclick: function() { range.setValue(33); } }
)
)
)
);
</script>
</body>