PATH:
home
/
letacommog
/
newrdv1
/
wp-content
/
themes
/
besa
/
js
'use strict'; (function ($) { $.fn.tbayCountDown = function (options) { return this.each(function () { new $.tbayCountDown(this, options); }); }; $.tbayCountDown = function (obj, options) { this.options = $.extend({ autoStart: true, LeadingZero: true, DisplayFormat: "<div>%%D%% Days</div><div>%%H%% Hours</div><div>%%M%% Minutes</div><div>%%S%% Seconds</div>", FinishMessage: "Expired", CountActive: true, TargetDate: null }, options || {}); if (this.options.TargetDate == null || this.options.TargetDate == '') { return; } this.timer = null; this.element = obj; this.CountStepper = -1; this.CountStepper = Math.ceil(this.CountStepper); this.SetTimeOutPeriod = (Math.abs(this.CountStepper) - 1) * 1000 + 990; var dthen = new Date(this.options.TargetDate); var dnow = new Date(); var ddiff = this.CountStepper > 0 ? new Date(dnow - dthen) : new Date(dthen - dnow); var gsecs = Math.floor(ddiff.valueOf() / 1000); this.CountBack(gsecs, this); }; $.tbayCountDown.fn = $.tbayCountDown.prototype; $.tbayCountDown.fn.extend = $.tbayCountDown.extend = $.extend; $.tbayCountDown.fn.extend({ calculateDate: function (secs, num1, num2) { var s = (Math.floor(secs / num1) % num2).toString(); if (this.options.LeadingZero && s.length < 2) { s = "0" + s; } return "<span>" + s + "</span>"; }, CountBack: function (secs, self) { if (secs < 0) { self.element.innerHTML = '<div class="lof-labelexpired"> ' + self.options.FinishMessage + "</div>"; return; } clearInterval(self.timer); var DisplayStr = self.options.DisplayFormat.replace(/%%D%%/g, self.calculateDate(secs, 86400, 100000)); DisplayStr = DisplayStr.replace(/%%H%%/g, self.calculateDate(secs, 3600, 24)); DisplayStr = DisplayStr.replace(/%%M%%/g, self.calculateDate(secs, 60, 60)); DisplayStr = DisplayStr.replace(/%%S%%/g, self.calculateDate(secs, 1, 60)); self.element.innerHTML = DisplayStr; if (self.options.CountActive) { self.timer = null; self.timer = setTimeout(function () { self.CountBack(secs + self.CountStepper, self); }, self.SetTimeOutPeriod); } } }); })(jQuery); class CountDownTimer { constructor() { $('[data-time="timmer"]').each((index, el) => { let date = $(el).data('date').split("-"), days = $(el).data('days') ? $(el).data('days') : '', hours = $(el).data('hours') ? $(el).data('hours') : '', mins = $(el).data('mins') ? $(el).data('mins') : '', secs = $(el).data('secs') ? $(el).data('secs') : ''; jQuery(el).tbayCountDown({ TargetDate: date[0] + "/" + date[1] + "/" + date[2] + " " + date[3] + ":" + date[4] + ":" + date[5], DisplayFormat: "<div class=\"times\"><div class=\"day\">%%D%%" + days + "</div><span>:</span><div class=\"hours\">%%H%%" + hours + "</div><span>:</span><div class=\"minutes\">%%M%%" + mins + "</div><span>:</span><div class=\"seconds\">%%S%%" + secs + "</div></div>", FinishMessage: "" }); }); $('[data-countdown="countdown"]').each((index, el) => { let date = $(el).data('date').split("-"), days = $(el).data('days') ? $(el).data('days') : '', hours = $(el).data('hours') ? $(el).data('hours') : '', mins = $(el).data('mins') ? $(el).data('mins') : '', secs = $(el).data('secs') ? $(el).data('secs') : ''; jQuery(el).tbayCountDown({ TargetDate: date[0] + "/" + date[1] + "/" + date[2] + " " + date[3] + ":" + date[4] + ":" + date[5], DisplayFormat: "<div class=\"times\"><div class=\"day\">%%D%%" + days + " </div><span>:</span><div class=\"hours\">%%H%%" + hours + " </div><span>:</span><div class=\"minutes\">%%M%%" + mins + " </div><span>:</span><div class=\"seconds\">%%S%%" + secs + " </div></div>", FinishMessage: "" }); }); } } jQuery(document).ready(function ($) { new CountDownTimer(); }); var CountDownTimerHandler = function ($scope, $) { new CountDownTimer(); }; $(document.body).on('tbay_quick_view', () => { new CountDownTimer(); }); jQuery(window).on('elementor/frontend/init', function () { if (jQuery.isArray(besa_settings.elements_ready.countdowntimer)) { $.each(besa_settings.elements_ready.countdowntimer, function (index, value) { elementorFrontend.hooks.addAction('frontend/element_ready/besa-' + value + '.default', CountDownTimerHandler); }); } });
[+]
..
[-] woocommerce.js
[edit]
[-] jquery.magnific-popup.min.js
[edit]
[-] jquery.countdownTimer.js
[edit]
[-] custom-slick.js
[edit]
[-] jquery.time-to.min.js
[edit]
[-] jquery.timeago.js
[edit]
[-] bootstrap.min.js
[edit]
[-] ajax-auth-script.min.js
[edit]
[-] jquery.onepagenav.min.js
[edit]
[-] jquery.treeview.js
[edit]
[-] ajax-auth-script.js
[edit]
[-] jquery.mmenu.min.js
[edit]
[-] functions.min.js
[edit]
[-] detectmobilebrowser.min.js
[edit]
[-] customize-preview.js
[edit]
[-] slick.js
[edit]
[-] jquery.fastclick.min.js
[edit]
[-] jquery.validate.js
[edit]
[-] functions.js
[edit]
[-] jquery.sumoselect.js
[edit]
[-] jquery.treeview.min.js
[edit]
[-] jquery.countdownTimer.min.js
[edit]
[-] jquery.instagramfeed.min.js
[edit]
[-] jquery.autocomplete.js
[edit]
[-] jquery.fastclick.js
[edit]
[-] jquery.sumoselect.min.js
[edit]
[-] color-scheme-control.js
[edit]
[-] custom-slick.min.js
[edit]
[-] jquery.mmenu.js
[edit]
[-] html5.min.js
[edit]
[-] js.cookie.js
[edit]
[-] slick.min.js
[edit]
[-] bootstrap.js
[edit]
[-] jquery.instagramfeed.js
[edit]
[-] color-scheme-control.min.js
[edit]
[-] jquery.timeago.min.js
[edit]
[-] html5.js
[edit]
[+]
admin
[-] jquery.time-to.js
[edit]
[-] customize-preview.min.js
[edit]
[-] detectmobilebrowser.js
[edit]
[-] skip-link-fix.js
[edit]
[-] woocommerce.min.js
[edit]
[-] jquery.autocomplete.min.js
[edit]
[-] jquery.onepagenav.js
[edit]
[-] popper.min.js
[edit]
[-] popper.js
[edit]
[-] jquery.validate.min.js
[edit]
[-] skip-link-fix.min.js
[edit]
[-] js.cookie.min.js
[edit]