JavaScript cчётчик обратного отсчёта (время до события)
var Countdown = { timer: null, init: function(id, until) { Countdown.node = document.getElementById(id); Countdown.update(until); Countdown.timer = setInterval(function() { Countdown.update(until); }, 1000); }, stop: function() { clearInterval(Countdown.timer); return true; }, update: function(until) { var s = Countdown.process(new Date(), until); Countdown.node.innerHTML = s || Countdown.stop() && ‘Всё ‘; }, difference: function(before, after) { if (after < before) [...]
More »
Пишу на PHP, работаю с различными CMS, люблю решать сложные задачи.