diff options
author | msquare <msquare@notrademark.de> | 2017-06-20 16:50:21 +0200 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2017-06-20 16:50:21 +0200 |
commit | 56814fa2fdf58b4013f4d57c5ea87619c7122957 (patch) | |
tree | 640945769b7e9626cdf43162c786147f5c962029 /public/js/moment-countdown.js | |
parent | a5fc5bd0979e8de1fce8a8addd351a6e7bd6aeb8 (diff) | |
parent | cd30017b97afc3c7001fbb9eb14b54dbb980b7b6 (diff) |
Merge branch 'pr/316' into feature-igel-rewrite
Diffstat (limited to 'public/js/moment-countdown.js')
-rw-r--r-- | public/js/moment-countdown.js | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/public/js/moment-countdown.js b/public/js/moment-countdown.js index 9d655038..0cc78210 100644 --- a/public/js/moment-countdown.js +++ b/public/js/moment-countdown.js @@ -3,17 +3,17 @@ * class "moment-countdown" and the attribute "data-timestamp" which defines the * countdown's time goal. */ -$(document).ready(function() { - if (typeof moment !== "undefined") { - $.each($(".moment-countdown"), function(i, e) { - var span = $(e); - var text = span.html(); - /* global moment */ - var timestamp = moment(parseInt(span.attr("data-timestamp") * 1000)); - span.html(text.replace("%c", timestamp.fromNow())); - setInterval(function() { - span.html(text.replace("%c", timestamp.fromNow())); - }, 1000); - }); - } -});
\ No newline at end of file +$(document).ready(function () { + if (typeof moment !== "undefined") { + $.each($(".moment-countdown"), function (i, e) { + var span = $(e); + var text = span.html(); + /* global moment */ + var timestamp = moment(parseInt(span.attr("data-timestamp") * 1000)); + span.html(text.replace("%c", timestamp.fromNow())); + setInterval(function () { + span.html(text.replace("%c", timestamp.fromNow())); + }, 1000); + }); + } +}); |