PK œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
| Dir : /home/oligap/www/wp-content/themes/woodmart/js/scripts/elements/ |
| Server: Linux cloud.virginhosting.lk 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64 IP: 128.140.68.198 |
| Dir : //home/oligap/www/wp-content/themes/woodmart/js/scripts/elements/counter.js |
/* global woodmart_settings */
(function($) {
$.each([
'frontend/element_ready/wd_counter.default'
], function(index, value) {
woodmartThemeModule.wdElementorAddAction(value, function() {
woodmartThemeModule.visibleElements();
});
});
woodmartThemeModule.counterShortcode = function(counter) {
if (counter.attr('data-state') === 'done' || parseInt(counter.text()) !== counter.data('final')) {
return;
}
counter.prop('Counter', 0).animate({
Counter: counter.text()
}, {
duration: parseInt(woodmart_settings.animated_counter_speed),
easing : 'swing',
step : function(now) {
if (now >= counter.data('final')) {
counter.attr('data-state', 'done');
}
counter.text(Math.ceil(now));
}
});
};
woodmartThemeModule.visibleElements = function() {
$('.woodmart-counter .counter-value').each(function() {
var $this = $(this);
$this.waypoint(function() {
woodmartThemeModule.counterShortcode($this);
}, {offset: '100%'});
});
};
$(document).ready(function() {
woodmartThemeModule.visibleElements();
});
})(jQuery);