Skip to content

kazanweb/TimeCounter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Структура HTML

	<div class="js-timer" data-time="2017/12/01 10:00:00 GMT+0300">

В скрипте

	var timers = document.querySelectorAll('.js-timer');

	Array.prototype.forEach.call(timers, function(node) {

		new TimeCounter({
			time: node.getAttribute('data-time'),
			callback: function(day, hour, minutes, seconds) {
				node.innerHTML = day + ' ' + hour + ' ' + minutes + ' ' + seconds;
			},
			timeEnd: function(day, hour, minutes, seconds) {
				alert('End')
			}
		});

	});

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published