diff --git a/demo.html b/demo.html index c168f13..34dd330 100755 --- a/demo.html +++ b/demo.html @@ -15,49 +15,59 @@
Project home: http://jchavannes.com/jquery-timer
-HTML
+<div id='time'>%lt;/div>+
Javascript
++var stopwatch = $.stopwatch(function(watch) { + $('#time').html(watch.getFormattedTime(); +});+ +
-
-
+ 00:00:00
+
+
+var Example1 = $.stopwatch(function () { + var output = this.getFormattedTime() + " - (" + this.getTime() + " milliseconds)"; + $("#stopwatch").html(output); +});
+var Example2 = $.countdown(function() { + $("#countdown").html(this.getFormattedTime()); + if (this.isFinished()) { + alert("Example 2: Countdown complete!"); + } +}, 20);+
- -
-timer has been executed 0 times.
+var count = 0; var timer = $.timer(function() { $('#counter').html(++count); }); timer.set({ time : 1000, autostart : true });+ + +Example 4 - Slideshow (preserves time remaining when paused)
++++
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+ +