Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pause/Resume #9

Open
n3g opened this issue Jan 13, 2014 · 1 comment
Open

Pause/Resume #9

n3g opened this issue Jan 13, 2014 · 1 comment

Comments

@n3g
Copy link

n3g commented Jan 13, 2014

Hi,
First of all, great plugin! :)
I'm trying to use it with a pause/resume button, however I'm getting the same behavior with start() and resume(): they both resume with the time that has elapsed.
I'm using jquery 1.10.2 with the latest version of your plugin.
The code I have is:

var timer_paused = false;

function pause_resume_timer() {
    var tt = $('#timer').data('tinyTimer'); 

    if (timer_paused) {
        tt.resume();
        timer_paused = false;
    } else {
        tt.stop();
        timer_paused = true;
    }
    $("#pause_resume_icon").toggleClass("icon-pause icon-play");
}
...
<i onclick="pause_resume_timer()" id="pause_resume_icon" class="icon-pause"></i><span id="timer" style="position: absolute; position: relative; left: -68px;"></span>

Any help is appreciated :)

@jasondavis
Copy link

Hello did you by chance ever get this working? I am trying to do the same thing myself, could use any help if you can? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants