1( function( $ ) { 2 "use strict"; 3 $( window ).on( 'elementor/frontend/init', function() { 4 elementorFrontend.hooks.addAction( 'frontend/element_ready/pxl_post_carousel.default', function( $scope ) { 5 pxl_swiper_handler($scope); 6 } ); 7 8 elementorFrontend.hooks.addAction( 'frontend/element_ready/pxl_testimonial_carousel.default', function( $scope ) { 9 pxl_swiper_handler($scope); 10 } ); 11 12 elementorFrontend.hooks.addAction( 'frontend/element_ready/pxl_team_carousel.default', function( $scope ) { 13 pxl_swiper_handler($scope); 14 } ); 15 16 elementorFrontend.hooks.addAction( 'frontend/element_ready/pxl_partner_carousel.default', function( $scope ) { 17 pxl_swiper_handler($scope); 18 } ); 19 20 elementorFrontend.hooks.addAction( 'frontend/element_ready/pxl_image_carousel.default', function( $scope ) { 21 pxl_swiper_handler($scope); 22 } ); 23 elementorFrontend.hooks.addAction( 'frontend/element_ready/pxl_solutions_carousel.default', function( $scope ) { 24 pxl_swiper_handler($scope); 25 } ); 26 elementorFrontend.hooks.addAction( 'frontend/element_ready/pxl_client_carousel.default', function( $scope ) { 27 pxl_swiper_handler($scope); 28 } ); 29 elementorFrontend.hooks.addAction( 'frontend/element_ready/pxl_service_carousel_build.default', function( $scope ) { 30 pxl_swiper_handler($scope); 31 } ); 32 elementorFrontend.hooks.addAction( 'frontend/element_ready/pxl_slider_carousel.default', function( $scope ) { 33 pxl_swiper_handler($scope); 34 } ); 35 } ); 36 37 function pxl_swiper_handler($scope){ 38 $scope.find('.pxl-swiper-slider').each(function(index, element) { 39 var $this = $(this); 40
41 var settings = $this.find(".pxl-swiper-container").data().settings; 42 43 var carousel_settings = { 44 allowTouchMove: settings['allow_touch_move'] === '' || settings['allow_touch_move'] === undefined ? true : settings['allow_touch_move'], 45 direction: settings['slide_direction'], 46 effect: settings['slide_mode'], 47 wrapperClass : 'pxl-swiper-wrapper', 48 slideClass: 'pxl-swiper-slide', 49 slidesPerView: settings['slides_to_show'] === 'auto' ? 'auto' : settings['slides_to_show'], 50 slidesPerGroup: settings['slides_to_scroll'], 51 slidesPerColumn: settings['slide_percolumn'], 52 spaceBetween: 0, 53 observer: true, 54 observeParents: true, 55 navigation: { 56 nextEl: $this.find('.pxl-swiper-arrow-next')[0], 57 prevEl: $this.find('.pxl-swiper-arrow-prev')[0], 58 }, 59 pagination : { 60 type: settings['pagination_type'], 61 el: $this.find('.pxl-swiper-dots')[0], 62 clickable : true, 63 modifierClass: 'pxl-swiper-pagination-', 64 bulletClass : 'pxl-swiper-pagination-bullet', 65 renderCustom: function (swiper, element, current, total) { 66 return current + ' of ' + total; 67 }, 68 renderBullet: function (index, className) { 69 return '<span class="' + className + '"><span></span></span>'; 70 } 71 }, 72 speed: settings['speed'], 73 watchSlidesProgress: true, 74 watchSlidesVisibility: true, 75 breakpoints: { 76 0 : { 77 slidesPerView: settings['slides_to_show_xs'], 78 slidesPerGroup: settings['slides_to_scroll'], 79 }, 80 576 : { 81 slidesPerView: settings['slides_to_show_sm'], 82 slidesPerGroup: settings['slides_to_scroll'], 83 }, 84 768 : { 85 slidesPerView: settings['slides_to_show_md'], 86 slidesPerGroup: settings['slides_to_scroll'], 87 }, 88 992 : { 89 slidesPerView: settings['slides_to_show_lg'], 90 slidesPerGroup: settings['slides_to_scroll'], 91 }, 92 1200 : { 93 slidesPerView: settings['slides_to_show'], 94 slidesPerGroup: settings['slides_to_scroll'], 95 }, 96 1400 : { 97 slidesPerView: settings['slides_to_show_xxl'], 98 slidesPerGroup: settings['slides_to_scroll'], 99 } 100 }, 101 on: { 102 103 init : function (swiper){ 104 var active_index = this.activeIndex; 105 var number_first = active_index < 10 ? '0' + (active_index + 1) : active_index + 1 ; 106 var number_total = this.slides.length < 10 ? '0' + this.slides.length : this.slides.length; 107 $('.pxl-swiper-fraction-first').html(number_first); 108 $('.pxl-swiper-fraction-last').html(number_total); 109 }, 110 111 slideChangeTransitionStart : function (swiper){ 112 var activeIndex = this.activeIndex; 113 $(this.slides).each(function(index){ 114 if(index == activeIndex) 115 $(this).find('.wow').removeClass('pxl-invisible').addClass('animated'); 116 else 117 $(this).find('.wow').removeClass('animated').addClass('pxl-invisible'); 118 }); 119 120 }, 121 122 slideChange: function (swiper) { 123 124 var activeIndex = this.activeIndex; 125 $(this.slides).each(function(index){ 126 if(index == activeIndex) 127 $(this).find('.wow').removeClass('pxl-invisible').addClass('animated'); 128 else 129 $(this).find('.wow').removeClass('animated').addClass('pxl-invisible'); 130 }); 131 132 var number_first = activeIndex < 10 ? '0' + (activeIndex + 1) : activeIndex + 1 ;
133 $('.pxl-swiper-fraction-first').html(number_first); 134 135 }, 136 137 sliderMove: function (swiper) { 138 139 var activeIndex = this.activeIndex; 140 $(this.slides).each(function(index){ 141 if(index == activeIndex) 142 $(this).find('.wow').removeClass('pxl-invisible').addClass('animated'); 143 else 144 $(this).find('.wow').removeClass('animated').addClass('pxl-invisible'); 145 }); 146 147 }, 148 149 } 150 }; 151 152 if(settings['center_slide'] || settings['center_slide'] == 'true') 153 carousel_settings['centeredSlides'] = true; 154 155 if(settings['loop'] || settings['loop'] === 'true'){ 156 carousel_settings['loop'] = true; 157 } 158 159 if(settings['autoplay'] || settings['autoplay'] === 'true'){ 160 carousel_settings['autoplay'] = { 161 delay : settings['delay'], 162 disableOnInteraction : settings['pause_on_interaction'] 163 }; 164 } else { 165 carousel_settings['autoplay'] = false; 166 } 167 168 // Creative Effect 169 if(settings['creative-effect'] === 'effect1'){ 170 carousel_settings['creativeEffect'] = { 171 prev: { 172 shadow: true, 173 origin: "left center", 174 translate: ["-5%", 0, -200], 175 rotate: [0, 100, 0], 176 }, 177 next: { 178 origin: "right center", 179 translate: ["5%", 0, -200], 180 rotate: [0, -100, 0], 181 }, 182 }; 183 } 184 185 if(settings['creative-effect'] === 'effect2'){ 186 carousel_settings['creativeEffect'] = { 187 prev: { 188 shadow: true, 189 translate: [0, 0, -400], 190 }, 191 next: { 192 translate: ["100%", 0, 0], 193 }, 194 }; 195 } 196 197 if(settings['creative-effect'] === 'effect3'){ 198 carousel_settings['creativeEffect'] = { 199 prev: { 200 opacity: 0, 201 }, 202 next: { 203 opacity: 0, 204 }, 205 }; 206 } 207 208 // Start Swiper Thumbnail 209 if ($this.find('.pxl-swiper-thumbs').length > 0) { 210 var thumb_settings = $this.find('.pxl-swiper-thumbs').data().settings; 211 212 var thumb_carousel_settings = { 213 effect: thumb_settings['slide_mode'], 214 direction: thumb_settings['slide_direction'], 215 spaceBetween: 0, 216 wrapperClass : 'pxl-swiper-wrapper', 217 slideClass: 'pxl-swiper-slide', 218 slidesPerView: thumb_settings['slides_to_show_thumbs'] || 'auto', 219 centeredSlides: false, 220 loop: thumb_settings['loop'], 221 watchSlidesProgress: true, 222 slideToClickedSlide: true, 223 breakpoints: { 224 0: { 225 slidesPerView: thumb_settings['slides_to_show_thumbs_xs'], 226 }, 227 576: { 228 slidesPerView: thumb_settings['slides_to_show_thumbs_sm'], 229 }, 230 768: { 231 slidesPerView: thumb_settings['slides_to_show_thumbs_md'], 232 }, 233 992: { 234 slidesPerView: thumb_settings['slides_to_show_thumbs_lg'], 235 }, 236 1200: { 237 slidesPerView: thumb_settings['slides_to_show_thumbs'] }, 238 1400: { 239 slidesPerView: thumb_settings['slides_to_show_thumbs_xxl'], 240 } 241 } 242 }; 243 244 var slide_thumbs = new Swiper($this.find('.pxl-swi
244per-thumbs')[0], thumb_carousel_settings); 245 carousel_settings['thumbs'] = { swiper: slide_thumbs }; 246 } 247 248 // End Swiper Thumbnail 249 250 var swiper = new Swiper($this.find(".pxl-swiper-container")[0], carousel_settings); 251 252 if(settings['autoplay'] === 'true' && settings['pause_on_hover'] === 'true'){ 253 $( $this.find('.pxl-swiper-container') ).on({ 254 mouseenter: function mouseenter() { 255 this.swiper.autoplay.stop(); 256 }, 257 mouseleave: function mouseleave() { 258 this.swiper.autoplay.start(); 259 } 260 }); 261 } 262 263 // Navigation Carousel 264 $('.pxl-navigation-carousel').parents('.elementor-section').addClass('pxl--hide-arrow'); 265 setTimeout(function() { 266 $('.pxl-navigation-carousel .pxl-navigation-arrow-prev').on('click', function () { 267 $(this).parents('.elementor-section').find('.pxl-swiper-arrow.pxl-swiper-arrow-prev').trigger('click'); 268 }); 269 $('.pxl-navigation-carousel .pxl-navigation-arrow-next').on('click', function () { 270 $(this).parents('.elementor-section').find('.pxl-swiper-arrow.pxl-swiper-arrow-next').trigger('click'); 271 }); 272 }, 300); 273 274 }); 275 276 }; 277} )( 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.