How to save counter time when jumping between tabs?

How to save counter time when jumping between tabs?

Hi
I am using the runner plugin  http://plugins.jquery.com/runner/

It is working perfectly. However, I have it to auto start counting as soon as the user load the page. However, the problem that I am having is that I have 4 tabs in my main page and I want to keep the timer running even if i switch the tabs.  I am assuming that I would have to store the value of timer in cookies some how and set the times to start counting from the cookies time.

but how can I store a value in cookies? and keep the cookies value upto date with my timer??

Here is my runner class
so "startAt" will have the default calue of the cookie if the cookie exist otherwise 0

$('#timer').runner(
autostart: true,
milliseconds: false,
startAt: 0
}
);

The trick is to keep the counter counting even if your not in the tab where the counter is placed.  so first time you land on the page where the counter is located start the timer and keep it counting even if the user jumps between tabs then.


Can some one please help me with this?

Thanks
    • Topic Participants

    • mike