| Issue 17: | Pause on stopwatch doesn't work |
1 of 8
Next ›
|
| 1 person starred this issue and may be notified of changes. | Back to list |
I was hoping to make a stopwatch with a button you click to start and stop the timer, which like most stopwatches started paused.
setting startpaused: true does not work for me.
You sample code left me a little in the dark about how to use the events, which I thought would be "triggered" using object.trigger("event-name") - maybe these don't work because the pause doesn't work...
here's my sample code (using jquery 1.4.2):
$(document).ready(function () {
$(".clicky-button").click(function (e) {
if ($(this).hasClass("pause")) {
$(this).removeClass("pause");
$(this).addClass("play");
$("#clock").trigger("resume");
} else {
$(this).removeClass("play");
$(this).addClass("pause");
$("#clock").trigger("pause");
}
});
$("#clock").epiclock({
startpaused: true,
mode: $.epiclock.modes.stopwatch
});
});
My project needs to use an input box to show (and update) the value but since it's value is set with .val() not .html() that doesn't work either and I'll probably have to end up copying the value into it using yet another timer.
Jul 16, 2010
Project Member
#1
gars...@gmail.com
Jul 24, 2011
Hi autostart do not works, here is my code:
$('#stopwatch').epiclock({startpaused:true,mode: $.epiclock.modes.stopwatch, format: 'x:i:s', renderer: 'retro'});
Please help me
|