html
<div id="timer">
<span id="minutes"></span>:<span id="seconds"></span>
</div>
JS
window.onload = function() {
var access = localStorage.getItem('firstAccess');
if(access == '') {
var d = new Date();
console.log(d);
var time = localStorage.setItem('firstAccess', JSON.stringify(d));
setTimer(time);
}
else {
setTimer(access);
}
function setTimer(time) {
var timespan = countdown(time).toString();
$('#minutes').html(timespan.minutes);
$('#seconds').html(timespan.seconds);
}
}
HereiswherethenameoftheItemsetthatisfirstAccessshouldappear