Looped Countdown base on timezone with Moment JS.
Hi,
That's the code I use for the Countdown, so it will repeat (loop) after 24 hours.
<script type='text/javascript'> jQuery(document).ready(function($){ $(function(){ var nextDay = new Date(). setHours(0, 0, 0, 0) + (1 * 24 * 60 * 60 * 1000); $('#clock').countdown(nextDay, function(event) { $(this).html(event.strftime('' + '<div><span class="number">%D</span> <span class="timertext">days</span></div>' + '<div><span class="number">%H</span> <span class="timertext">hours</span></div>' + '<div><span class="number">%M</span> <span class="timertext">mins</span></div>' + '<div><span class="number">%S</span> <span class="timertext">secs</span></div>' )); }); }); });
I need to add US/Central UTC -06:00 to Countdown.