Skip to content

Commit

Permalink
Adds a superposition example (clock)
Browse files Browse the repository at this point in the history
  • Loading branch information
aterrien committed Mar 23, 2013
1 parent 6f159c1 commit 69d60e2
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,37 @@ <h1>jQuery Knob</h1>
</div>
</div>
<div style="clear:both"></div>
<script>
function clock() {
var $s = $(".second"),
$m = $(".minute"),
$h = $(".hour");
d = new Date(),
s = d.getSeconds(),
m = d.getMinutes(),
h = d.getHours();
$s.val(s).trigger("change");
$m.val(m).trigger("change");
$h.val(h).trigger("change");
setTimeout("clock()", 1000);
}
clock();
</script>
<div class="demo" style="color:#EEE;background:#222;height:420px;width:100%">
<p>&#215; Superpose (clock)</p>
<div style="position:relative;width:350px;margin:auto">
<div style="position:absolute;left:10px;top:10px">
<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">
</div>
<div style="position:absolute;left:60px;top:60px">
<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">
</div>
<div style="position:absolute;left:110px;top:110px">
<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">
</div>
</div>
</div>
<div style="clear:both"></div>
<div class="demo">
<p>&#215; Readonly</p>
<pre>
Expand Down

0 comments on commit 69d60e2

Please sign in to comment.