PageSourceSearch

https://dataslicesagency.ai/wp-content/themes/aimo/elements/assets/js/carousel.js?ver=1782192529

js dataslicesagency.ai collected 2026-10-05 15:32:06 UTC 11,447 bytes, 268 lines download raw bytes

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