Created
October 14, 2015 13:37
-
-
Save xto3na/bc88a1ff2e4a64f1872e to your computer and use it in GitHub Desktop.
Цикличный обратный отсчет на JS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************** Обратный отсчет *************************/ | |
var month = new Date().getMonth() + 1; | |
if (month == 0) {month++;}; | |
console.log(month); | |
var currentDate = new Date(); | |
var futureDate = new Date(2015, month, 1); | |
var diff = futureDate.getTime() / 1000 - currentDate.getTime() / 1000; | |
/*var diff = 3600 * 24 * 20.17535;*/ | |
var clock = $('#my-clock').FlipClock(diff, { | |
autoStart: true, | |
clockFace: 'DailyCounter', | |
countdown: true, | |
language:'ru-ru' | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment