1(function ($) { 2 3 var basicCarousel = function ($scope, $) { 4 var $basicCarousel = $scope.find('.basic-carousel'); 5 var dataSlick = $basicCarousel.attr('data-slick'); 6 7 if (dataSlick !== undefined) { 8 var data_Carousel = JSON.parse(dataSlick); 9 let bps = elementorFrontend.config.responsive.activeBreakpoints; 10 $basicCarousel.slick({ 11 // rtl: true, 12 vertical: data_Carousel.vertical, 13 verticalSwiping: false, 14 autoplay: data_Carousel.autoplay, 15 autoplaySpeed: data_Carousel.autoplaySpeed, 16 infinite: data_Carousel.infinite, 17 speed: data_Carousel.speed, 18 cssEase: 'linear', 19 slidesToShow: data_Carousel.slidesToShow, 20 centerPadding: data_Carousel.centerPadding, 21 slidesToScroll: data_Carousel.slidesToScroll, 22 centerMode: data_Carousel.center_mode, 23 variableWidth: data_Carousel.variableWidth, 24 arrows: data_Carousel.arrows, 25 dots: data_Carousel.dots, 26 prevArrow: data_Carousel.prevArrow, 27 nextArrow: data_Carousel.nextArrow, 28 responsive: [{ 29 breakpoint: bps.laptop.value + 1, 30 settings: { 31 slidesToShow: data_Carousel.slidesToShow_laptop, 32 slidesToScroll: data_Carousel.slidesToScroll_laptop, 33 centerPadding: data_Carousel.centerPadding_laptop, 34 arrows: data_Carousel.arrows_laptop, 35 dots: data_Carousel.dots_laptop, 36 } 37 }, 38 { 39 breakpoint: bps.tablet_extra.value + 1, 40 settings: { 41 slidesToShow: data_Carousel.slidesToShow_tablet_extra, 42 slidesToScroll: data_Carousel.slidesToScroll_tablet_extra, 43 centerPadding: data_Carousel.centerPadding_tablet_extra, 44 arrows: data_Carousel.arrows_tablet_extra, 45 dots: data_Carousel.dots_tablet_extra, 46 } 47 }, 48 { 49 breakpoint: bps.tablet.value + 1, 50 settings: { 51 slidesToShow: data_Carousel.slidesToShow_tablet, 52 slidesToScroll: data_Carousel.slidesToScroll_tablet, 53 centerPadding: data_Carousel.centerPadding_table, 54 arrows: data_Carousel.arrows_tablet, 55 dots: data_Carousel.dots_tablet, 56 } 57 }, 58 { 59 breakpoint: bps.mobile_extra.value + 1, 60 settings: { 61 slidesToShow: data_Carousel.slidesToShow_mobile_extra, 62 slidesToScroll: data_Carousel.slidesToScroll_mobile_extra, 63 centerPadding: data_Carousel.centerPadding_mobile_extra, 64 arrows: data_Carousel.arrows_mobile_extra, 65 dots: data_Carousel.dots_mobile_extra, 66 } 67 }, 68 { 69 breakpoint: bps.mobile.value + 1, 70 settings: { 71 slidesToShow: data_Carousel.slidesToShow_mobile, 72 slidesToScroll: data_Carousel.slidesToScroll_mobile, 73 centerPadding: data_Carousel.centerPadding_mobile, 74 arrows: data_Carousel.arrows_mobile, 75 dots: data_Carousel.dots_mobile, 76 } 77 }, 78 ] 79 }); 80 } 81 82 // var refreshed = false; 83 // var ns = 0; 84 // // $(window).bind('load scroll', function () { 85 // if (!refreshed || ns == 1) { 86 // $basicCarousel.slick('refresh'); 87 // refreshed = true; 88 // ns++; 89 // } 90 // }); 91 $(window).on('resize', function () { 92 if ($basicCarousel.hasClass('slick-initialized')) { 93 $basicCarousel.slick('slickPause'); 94 $basicCarousel.slick('setPosition'); // reposition elements 95 $basicCarousel.slick('slickPlay'); 96 } 97}); 98 } 99 $(window).on('elementor/frontend/init', function () { 100 elementorFrontend.hooks.addAction('frontend/element_ready/basic-carousel.default', basicCarousel); 101 });
102 103})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.