1(function ($) { 2 "use strict"; 3 4 $(window).on("elementor/frontend/init", function () { 5 elementorFrontend.hooks.addAction("frontend/element_ready/mgposts_carousel.default", function (scope, $) { 6 7 var mgpCarousel = $(scope).find(".mgpc-pcarousel"); 8 var mgpCarLoop = mgpCarousel.data('loop'); 9 var mgpCarDirection = mgpCarousel.data('direction'); 10 var mgpCarNumber = mgpCarousel.data('number'); 11 var mgpCarMargin = mgpCarousel.data('margin'); 12 var mgpCarSpeed = mgpCarousel.data('speed'); 13 var mgpCarAutoplay = mgpCarousel.data('autoplay'); 14 var mgpCarAutoDelay = mgpCarousel.data('auto-delay'); 15 var mgpCarAutoHeight = mgpCarousel.data('auto-height'); 16 var mgpCarGrabCursor = mgpCarousel.data('grab-cursor'); 17 18 if(mgpCarAutoplay == 'yes'){ 19 20 $( mgpCarousel ).hover(function() { 21 (this).swiper.autoplay.stop(); 22 }, function() { 23 (this).swiper.autoplay.start(); 24 }); 25 26 var autoPlayData = { 27 delay: mgpCarAutoDelay, 28 disableOnInteraction: false, 29 pauseOnMouseEnter: true, 30 }; 31 }else{ 32 var autoPlayData = false; 33 } 34 // slider number set 35 if(mgpCarNumber > 1){ 36 var breakpointsValue = { 37 768: { 38 slidesPerView: 2, 39 spaceBetween: mgpCarMargin, 40 }, 41 991: { 42 slidesPerView: mgpCarNumber, 43 spaceBetween: mgpCarMargin, 44 }, 45 } 46 }else{ 47 var breakpointsValue = { 48 991: { 49 slidesPerView: mgpCarNumber, 50 spaceBetween: mgpCarMargin, 51 }, 52 } 53 } 54 55 var shopCarouselSwiper = new Swiper (mgpCarousel, { 56 // Optional parameters 57 direction: mgpCarDirection, // vertical 58 slidesPerView: 1, 59 spaceBetween: 10, 60 loop: mgpCarLoop, 61 speed: mgpCarSpeed, 62 autoplay: autoPlayData, 63 autoHeight: mgpCarAutoHeight, 64 grabCursor: mgpCarGrabCursor, 65 watchSlidesProgress: true, 66 watchSlidesVisibility: true, 67 breakpoints: breakpointsValue, 68 pagination: { 69 el: '.swiper-pagination', 70 clickable: true, 71 }, 72 navigation: { 73 nextEl: '.swiper-button-next', 74 prevEl: '.swiper-button-prev', 75 }, 76 }) 77 $( document ).ready(function() { 78 $('.mgpc-pcarousel .swiper-slide').removeClass('no-load'); 79 80 }); 81 82 83 84 }); 85 }) 86 87 88 89 90}(jQuery)); 91 92
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.