JavaScript timer jump ahead
<p>Hi guys please check this code, first part from innit, second is my timer function. Thanks alot!</p>

<p>I set up a timer for 15min. Save the time in cookies and read saved time on init</p>

<pre><code>var cc=readCookie("agreement");
var ct=readCookie("secondsleft");

if (ct == null || ct == '') {
    secondsleft = 15*60;
} else {
    secondsleft = parseInt(ct);
}

myInterval = setInterval(bingoTimer,1000);
</code></pre>

<p>Can anyone see why after refresh this code jumps to 0:13?</p>

<pre><code>function bingoTimer() {
    secondsleft--;

    if (secondsleft &lt; 0) {

    } else {
        var minLeft = parseInt(secondsleft / 60);
        var secLeft = secondsleft - minLeft * 60;
        var timeLeft = " " + minLeft+":" + secLeft;
        var timeCookie = createCookie("secondsleft", timeLeft);
        $('#timer').html(timeLeft);
    }
}
</code></pre>
