Dmitriy9832
Новичок
Дата регистрации:
25.02.2016 20:12:49
Сообщений: 1
var time = new Date(),
day = time.getMonth(),
d = time.getDate(),
year = time.getFullYear(),
dayCount = 32 - new Date(4, year, day, d+1).getDate();
if (d == dayCount){
d = 1;
day = day + 1;
if (day == 12){
year = year + 1;
}
}
$('.countdown,.countdown2,.countdown3,.countdown4'.countdown({until:$.countdown.UTCDate(4, year, day, d+1), format: 'DHMS', layout:
'<div id="timer">' +
'<div id="timer_days" class="timer_numbers days"><span>{dnn}</span></div>'+
'<div id="timer_hours" class="timer_numbers hours"><span>{hnn}</span></div>'+
'<div id="timer_mins" class="timer_numbers mins"><span>{mnn}</span></div>'+
'<div id="timer_seconds" class="timer_numbers seconds"><span>{snn}</span></div>'+
'</div>'});
});
Помогите пожалуйста, объясните немного, как этот скрипт работает?