<!-- http://hilios.github.io/jQuery.countdown 플러그인 사용 -->
<div data-countdown="2020/05/21"></div>
<div data-countdown="2019/05/21 12:34:56"></div>
<div class="__count"></div>
<script>
$('[data-countdown]').each(function() {
var $this = $(this), finalDate = $(this).data('countdown');
$this.countdown(finalDate, function(event) {
var totalHours = event.offset.totalDays * 24 + event.offset.hours;
$this.html(event.strftime(totalHours+'시간 %M분 %S초 남음'));
});
});
$('.__count').countdown('2019/12/01', function(event) {
$(this).text(event.strftime('%D일 %H:%M:%S 남음'));
});
</script>