Skip to content

Commit 69d60e2

Browse files
committed
Adds a superposition example (clock)
1 parent 6f159c1 commit 69d60e2

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

index.html

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,37 @@ <h1>jQuery Knob</h1>
205205
</div>
206206
</div>
207207
<div style="clear:both"></div>
208+
<script>
209+
function clock() {
210+
var $s = $(".second"),
211+
$m = $(".minute"),
212+
$h = $(".hour");
213+
d = new Date(),
214+
s = d.getSeconds(),
215+
m = d.getMinutes(),
216+
h = d.getHours();
217+
$s.val(s).trigger("change");
218+
$m.val(m).trigger("change");
219+
$h.val(h).trigger("change");
220+
setTimeout("clock()", 1000);
221+
}
222+
clock();
223+
</script>
224+
<div class="demo" style="color:#EEE;background:#222;height:420px;width:100%">
225+
<p>&#215; Superpose (clock)</p>
226+
<div style="position:relative;width:350px;margin:auto">
227+
<div style="position:absolute;left:10px;top:10px">
228+
<input class="knob hour" data-min="0" data-max="24" data-bgColor="#333" data-fgColor="#ffec03" data-displayInput=false data-width="300" data-height="300" data-thickness=".3">
229+
</div>
230+
<div style="position:absolute;left:60px;top:60px">
231+
<input class="knob minute" data-min="0" data-max="60" data-bgColor="#333" data-displayInput=false data-width="200" data-height="200" data-thickness=".45">
232+
</div>
233+
<div style="position:absolute;left:110px;top:110px">
234+
<input class="knob second" data-min="0" data-max="60" data-bgColor="#333" data-fgColor="rgb(127, 255, 0)" data-displayInput=false data-width="100" data-height="100" data-thickness=".3">
235+
</div>
236+
</div>
237+
</div>
238+
<div style="clear:both"></div>
208239
<div class="demo">
209240
<p>&#215; Readonly</p>
210241
<pre>

0 commit comments

Comments
 (0)