(function ($) { "use strict"; // Slick Review var customers_review_js = function () { $('.customers_review_slider').slick({ "dots": true, "arrows": false, "slidesToShow": 3, "autoplay": true, "autoplaySpeed": 8500, "slidesToScroll": 1, "responsive": [ { "breakpoint": 1230, "settings": { "slidesToShow": 2 } }, { "breakpoint": 546, "settings": { "slidesToShow": 1 } } ] }); }; // Slick Review // Slick Review var customers_doc_js = function () { $('.customers_doc_slider').slick({ "dots": true, "arrows": false, "slidesToShow": 2, "autoplay": true, "autoplaySpeed": 6500, "slidesToScroll": 1, "responsive": [ { "breakpoint": 1230, "settings": { "slidesToShow": 2 } }, { "breakpoint": 546, "settings": { "slidesToShow": 1 } } ] }); }; // Slick Review var sanitizex_review_js = function () { $('.sanitizex_review_slider').slick({ "dots": true, "arrows": false, "slidesToShow": 1, "adaptiveHeight": true, "autoplay": true, "autoplaySpeed": 4500, "slidesToScroll": 1, "fade": true }); }; var tt_logo_layout_js = function ($scope, $) { $('.tt-logo-layout').slick({ "dots": true, "arrows": false, "slidesToShow": 6, "autoplay": true, "autoplaySpeed": 7500, "slidesToScroll": 3, "responsive": [ { "breakpoint": 1024, "settings": { "slidesToShow": 5 } }, { "breakpoint": 546, "settings": { "slidesToShow": 3, "slidesToScroll": 3 } } ] }); }; var js_mainslider = function () { var $body = $('body'), blocks = { mainSlider: $('#js-mainSlider') }; // main slider if (blocks.mainSlider.length) { mainSlider(); }; function mainSlider() { var $el = blocks.mainSlider; $el.find('.slide').first().imagesLoaded({ background: true }, function(){ setTimeout(function () { $el.parent().find('.loading-content').addClass('disable'); $body.addClass('load-mainslider'); }, 300); }); $el.on('init', function (e, slick) { var $firstAnimatingElements = $('div.slide:first-child').find('[data-animation]'); doAnimations($firstAnimatingElements); }); $el.on('beforeChange', function (e, slick, currentSlide, nextSlide) { var $currentSlide = $('div.slide[data-slick-index="' + nextSlide + '"]'); var $animatingElements = $currentSlide.find('[data-animation]'); doAnimations($animatingElements); }); $el.slick({ arrows: false, dots: true, autoplay: true, autoplaySpeed: 5500, fade: true, speed: 1000, pauseOnHover: false, pauseOnDotsHover: true, lazyLoad: 'ondemand', responsive: [{ breakpoint: 768, settings: { arrows: false } },{ breakpoint: 1025, settings: { dots: false, arrows: false } }] }); } function doAnimations(elements) { var animationEndEvents = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend'; elements.each(function () { var $this = $(this); var $animationDelay = $this.data('animation-delay'); var $animationType = 'animated ' + $this.data('animation'); $this.css({ 'animation-delay': $animationDelay, '-webkit-animation-delay': $animationDelay }); $this.addClass($animationType).one(animationEndEvents, function () { $this.removeClass($animationType); }); if ($this.hasClass('animate')) { $this.removeClass('animation'); } }); }; }; var blog_slider_js = function () { $('.blog_post_slider').slick({ "dots": true, "arrows": false, "slidesToShow": 3, "autoplay": true, "autoplaySpeed": 7000, "slidesToScroll": 3, "responsive": [ { "breakpoint": 1024, "settings": { "slidesToShow": 2 } }, { "breakpoint": 576, "settings": { "slidesToShow": 1, "slidesToScroll": 1 } } ] }); }; //Elementor JS Hooks $(window).on('elementor/frontend/init', function () { elementorFrontend.hooks.addAction('frontend/element_ready/customers_review.default', customers_doc_js); elementorFrontend.hooks.addAction('frontend/element_ready/customers_review.default', customers_review_js); elementorFrontend.hooks.addAction('frontend/element_ready/sanitizex_brand.default', tt_logo_layout_js); elementorFrontend.hooks.addAction('frontend/element_ready/sanitizex_banner_slider.default', js_mainslider); elementorFrontend.hooks.addAction('frontend/element_ready/sanitizex_testimonial.default', sanitizex_review_js); elementorFrontend.hooks.addAction('frontend/element_ready/sanitizex_blog.default', blog_slider_js); }); })(window.jQuery);