Reputation: 23
I have implemented a timer using jquery which is a flipclock for an exam of a website. The problem with the timer is that when the page is kept ideal for sometime without selecting options and when reloading the page, the timer gets resetted to zero. How can I prevent this ? Also I wanted to retain the timer value when the page is reloaded.
$(document).ready(function() {
var time_min_sec = '00:00:00';
var flip = new FlipClock({
isCountdown: false,
startTime: time_min_sec,
containerElement: $('.countdown'),
});
history.pushState(null, null, location.href);
window.onpopstate = function () {
history.go(1);
};
});
Upvotes: 0
Views: 27