| Server IP : 162.144.4.212 / Your IP : 216.73.216.49 Web Server : Apache System : Linux gator2125.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : cozeellc ( 2980) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home4/cozeellc/public_html/wp-content/themes/motta/assets/js/plugins/ |
Upload File : |
/**
* jQuery Tabs plugin 1.0.0
*
* @author Drfuri
*/
(function ($) {
$.fn.motta_countdown = function () {
return this.each(function () {
var $this = $(this),
diff = $this.data('expire');
var updateClock = function (distance) {
var days = Math.floor(distance / (60 * 60 * 24));
var hours = Math.floor((distance % (60 * 60 * 24)) / (60 * 60));
var minutes = Math.floor((distance % (60 * 60)) / (60));
var seconds = Math.floor(distance % 60);
var texts = $this.data('text');
$this.html(
'<span class="days timer"><span class="digits">' + (days < 10 ? '0' : '') + days + '</span><span class="text">' + texts.days + '</span><span class="divider">:</span></span>' +
'<span class="hours timer"><span class="digits">' + (hours < 10 ? '0' : '') + hours + '</span><span class="text">' + texts.hours + '</span><span class="divider">:</span></span>' +
'<span class="minutes timer"><span class="digits">' + (minutes < 10 ? '0' : '') + minutes + '</span><span class="text">' + texts.minutes + '</span><span class="divider">:</span></span>' +
'<span class="seconds timer"><span class="digits">' + (seconds < 10 ? '0' : '') + seconds + '</span><span class="text">' + texts.seconds + '</span></span>'
);
};
updateClock(diff);
var countdown = setInterval(function () {
diff = diff - 1;
updateClock(diff);
if (diff < 0) {
clearInterval(countdown);
}
}, 1000);
});
};
/* Init tabs */
$(function () {
$('.motta-countdown').motta_countdown();
$(document.body).on('motta_countdown', function (e, $el) {
$el.motta_countdown();
});
});
})(jQuery);