(function($) { $( window ).on( 'elementor/frontend/init', function() { elementorFrontend.hooks.addAction( 'frontend/element_ready/global', function($scope, $){ $('.responsive-slider').each(function(){ var $id = $(this); var $app = $id.data('append'); var $append = ( typeof( $app ) == 'undefined' ) ? $id : $(this).find($app); var $target = $(this).find( '.responsive' ); var $col_lg = $id.data('lg'); var $col_md = $id.data('md'); var $col_sm = $id.data('sm'); var $col_xs = $id.data('xs'); var $col_mobile = $id.data('mobile'); var $speed = $id.data('speed'); var $interval = $id.data('interval'); var $scroll = $id.data('scroll'); var $autoplay = $id.data('autoplay'); var $rtl = ( $('body').hasClass('rtl') ) ? true : false; var $vertical = ( typeof( $id.data('vertical') ) != "undefined" ) ? $id.data('vertical') : false; var $fade = ( typeof( $id.data('fade') != "undefined" ) ) ? $id.data('fade') : false; var $dots = ( typeof( $id.data('dots') != "undefined" ) ) ? $id.data('dots') : false; $target.not('.slick-initialized').slick({ appendArrows: $append, prevArrow: '', nextArrow: '', dots: $dots, infinite: true, speed: $speed, slidesToShow: $col_lg, slidesToScroll: $scroll, autoplay: $autoplay, autoplaySpeed: $interval, vertical: $vertical, rtl: $rtl, responsive: [ { breakpoint: 1199, settings: { slidesToShow: $col_md } }, { breakpoint: 991, settings: { slidesToShow: $col_sm } }, { breakpoint: 767, settings: { slidesToShow: $col_xs } }, { breakpoint: 480, settings: { slidesToShow: $col_mobile } } // You can unslick at a given breakpoint now by adding: // settings: "unslick" // instead of a settings object ] }); $(this).removeClass('loading'); }); $( '.testimonial-post-slider' ).each(function(){ var $rtl = $('body').hasClass( 'rtl' ); var $img_slider = $(this).find('.responsive-content'); var $interval = $(this).data('interval'); var $autoplay = $(this).data('autoplay'); var $thumb_slider = $(this).find('.responsive-thumbnail'); $('.responsive-content').not('.slick-initialized').slick({ slidesToShow: 1, slidesToScroll: 1, autoplay: $autoplay, autoplaySpeed: $interval, arrows: true, dots: true, fade: false, rtl: $rtl, adaptiveHeight: true, infinite: false, useTransform: false, speed: 800, cssEase: 'cubic-bezier(0.77, 0, 0.18, 1)', }); $('.responsive-thumbnail') .on('init', function(event, slick) { $('.responsive-thumbnail .slick-slide.slick-current').addClass('is-active'); }) .not('.slick-initialized').slick({ slidesToShow: 4, slidesToScroll: 2, centerMode: true, dots: false, focusOnSelect: false, infinite: false, responsive: [{ breakpoint: 1024, settings: { slidesToShow: 4, slidesToScroll: 1, } }, { breakpoint: 640, settings: { slidesToShow: 4, slidesToScroll: 1, } }, { breakpoint: 420, settings: { slidesToShow: 3, slidesToScroll: 1, } }] }); $('.responsive-content').on('afterChange', function(event, slick, currentSlide) { $('.responsive-thumbnail').slick('slickGoTo', currentSlide); var currrentNavSlideElem = '.responsive-thumbnail .slick-slide[data-slick-index="' + currentSlide + '"]'; $('.responsive-thumbnail .slick-slide.is-active').removeClass('is-active'); $(currrentNavSlideElem).addClass('is-active'); }); $('.responsive-thumbnail').on('click', '.slick-slide', function(event) { event.preventDefault(); var goToSingleSlide = $(this).data('slick-index'); $('.responsive-content').slick('slickGoTo', goToSingleSlide); }); $('.responsive-thumbnail .slick-slide').removeClass('slick-active'); //set active class to first thumbnail slides $('.responsive-thumbnail .slick-slide').eq(0).addClass('is-active'); var el = $(this); setTimeout(function(){ el.removeClass("loading"); }, 1000); }); $('.sw-tab-slider').each(function(){ var $id = $(this); var $app = $id.data('append'); var $append = ( typeof( $app ) == 'undefined' ) ? $id : $(this).find($app); var $target = $(this).find( '.responsive-verticle' ); var $col_lg = $id.data('lg'); var $col_md = $id.data('md'); var $col_sm = $id.data('sm'); var $col_xs = $id.data('xs'); var $col_mobile = $id.data('mobile'); var $speed = $id.data('speed'); var $interval = $id.data('interval'); var $scroll = $id.data('scroll'); var $autoplay = $id.data('autoplay'); var $rtl = ( $('body').hasClass('rtl') ) ? true : false; var $vertical = ( typeof( $id.data('vertical') ) != "undefined" ) ? $id.data('vertical') : false; var $fade = ( typeof( $id.data('fade') != "undefined" ) ) ? $id.data('fade') : false; var $dots = ( typeof( $id.data('dots') != "undefined" ) ) ? $id.data('dots') : false; $target.not('.slick-initialized').slick({ appendArrows: $append, prevArrow: '', nextArrow: '', dots: $dots, infinite: true, speed: $speed, slidesToShow: $col_lg, slidesToScroll: $scroll, autoplay: $autoplay, autoplaySpeed: $interval, vertical: $vertical, responsive: [ { breakpoint: 1199, settings: { slidesToShow: $col_md } }, { breakpoint: 991, settings: { slidesToShow: $col_sm } }, { breakpoint: 767, settings: { slidesToShow: $col_xs } }, { breakpoint: 480, settings: { slidesToShow: $col_mobile } } // You can unslick at a given breakpoint now by adding: // settings: "unslick" // instead of a settings object ] }); $(this).removeClass('loading'); }); }); } ); $(function() { $(".sw-woo-tab-cat16").each(function(){ $this = $(this); if( $this.hasClass("style1") ){ var id_taeb = $(".sw-woo-tab-cat16 .nav.nav-tabs").attr("id"); $("#"+id_taeb).find("li").on("click", function() { var $this = $(this); var direction = $this.attr("taeb-direction"); $("#"+id_taeb).removeClass("left right").addClass(direction); }); }else if( $this.hasClass("style2") ){ var id_taeb = $(".sw-woo-tab-cat16.style2 .nav.nav-tabs").attr("id"); $("#"+id_taeb).find("li").on("click", function() { var $this = $(this); var direction = $this.attr("taeb-direction"); $("#"+id_taeb).removeClass("left right").addClass(direction); }); } }); }); })(jQuery);