PageSourceSearch

https://nichesoft.ai/wp-content/themes/orritech/elements/widgets/js/pxl-swiper-slider.js?ver=1.0.0

js nichesoft.ai collected 2026-10-05 14:57:28 UTC 10,211 bytes, 212 lines download raw bytes

1( function( $ ) { 
2    "use strict"
3    var pxl_slider_handler = function( $scope, $ ) {
4        var breakpoints = elementorFrontend.config.breakpoints,
5            carousel = $scope.find(".pxl-swiper-container");
6        if(carousel.length == 0){
7            return false;
8        }
9
10        var data = carousel.data(), 
11            settings = data.settings,
12            custom_dots = data.customdot,
13            carousel_settings = {
14                direction: settings['slide_direction'],
15                effect: settings['slide_mode'],
16                wrapperClass : 'pxl-swiper-wrapper',
17                slideClass: 'pxl-swiper-slide',
18                slidesPerView: 1,
19                slidesPerGroup: 1,
20                slidesPerColumn: 1,
21                spaceBetween: 0,
22                navigation: {
23                  nextEl: $scope.find(".pxl-swiper-arrow-next"),
24                  prevEl: $scope.find(".pxl-swiper-arrow-prev"),
25                },
26                pagination : {
27                    type: settings['pagination_type'],
28                    el: $scope.find('.pxl-swiper-dots'),
29                    clickable : true,
30                    modifierClass: 'pxl-swiper-pagination-',
31                    bulletClass : 'pxl-swiper-pagination-bullet',
32                    formatFractionCurrent: function (number) {
33                        return ('0' + number).slice(-2);
34                    },
35                    formatFractionTotal: function (number) {
36                        return ('0' + number).slice(-2);
37                    },
38                    renderFraction: function (currentClass, totalClass) {
39                        return '<span class="' + currentClass + '"></span>' +
40                               '/' +
41                               '<span class="' + totalClass + '"></span>';
42                    },
43                    renderCustom: function (swiper, element, current, total) {
44                        return current + ' of ' + total;
45                    }
46                },
47                speed: settings['speed'],
48                watchSlidesProgress: true,
49                watchSlidesVisibility: true,
50                autoplay: settings['autoplay'],
51                on: {
52                    init : function (swiper){ 
53                        elementorFrontend.waypoint($scope.find('.pxl-animate'), function () {
54                            var $this = $(this),
55                                data = $this.data('settings');
56                            if(typeof data['animation'] != 'undefined'){
57                                setTimeout(function () {
58                                    $this.removeClass('pxl-invisible').addClass('animated ' + data['animation']);
59                                }, data['animation_delay']);
60                            }
61                        });
62                        pxl_ken_burns(this);  
63                    },
64                    slideChangeTransitionStart : function (swiper){
65                        var activeIndex = this.activeIndex;
66                        var current = this.slides.eq(activeIndex);
67
68                        $scope.find('.pxl-elementor-animate').each(function(){
69                            var data = $(this).data('settings');
70                            if(typeof data['_animation'] != 'undefined')
71                                $(this).removeClass('animated '+data['_animation']).addClass('elementor-invisible');
72                        });
73                        current.find('.pxl-elementor-animate').each(function(){
74                            var  $item = $(this), 
75                                data = $item.data('settings');
76                            if(typeof data['_animation'] != 'undefined'){
77                                setTimeout(function () {  
78                                    $item.removeClass('elementor-invisible').addClass('animated ' + data['_animation']);
79                                }, data['_animation_delay']);
80                            }
81                        });
82
83                        $scope.find('.swiper-slide .pxl-animate').each(function(){
84                            var data = $(this).data('settings');
85                            $(this).removeClass('animated '+data['animation']).addClass('pxl-invisible');
86                        });
87                        current.find('.pxl-animate').each(function(){
88                            var  $item = $(this), 
89                                data = $item.data('settings');
90                            setTimeout(function () {
91                                $item.removeClass('pxl-invisible').addClass('animated ' + data['animation']);
92                            }, data['animation_delay']);
93                        });
94
95                        $(this.slides).each(function(index){
96                            if(index == activeIndex)
97                                $(this).find('.wow').removeClass('pxl-invisible').addClass('animated');
98                            else
99                                $(this).find('.wow').removeClass('animated').addClass('pxl-invisible');
100                        });
101                        pxl_ken_burns(this);  
102                        
103                    },
104                    slideChange: function (swiper) {
105                        var activeIndex = this.activeIndex; 
106                        var current = this.slides.eq(activeIndex);
107                        
108                        $scope.find('.pxl-elementor-animate').each(function(){
109                            var data = $(this).data('settings');
110                            if(typeof data['_animation'] != 'undefined')
111                                $(this).removeClass('animated '+data['_animation']).addClass('elementor-invisible');
112                        });
113                        current.find('.pxl-elementor-animate').each(function(){
114                            var  $item = $(this), 
115                                data = $item.data('settings');
116                            if(typeof data['_animation'] != 'undefined'){
117                                setTimeout(function () {  
118                                    $item.removeClass('elementor-invisible').addClass('animated ' + data['_animation']);
119                                }, data['_animation_delay']);
120                            }
121                        });
122
123                        $scope.find('.swiper-slide .pxl-animate').each(function(){
124                            var data = $(this).data('settings');
125
126                            $(this).removeClass('animated '+data['animation']).addClass('pxl-invisible');
127                        });
128                        current.find('.pxl-animate').each(function(){
129                            var  $item = $(this), 
130                                data = $item.data('settings');
131                            setTimeout(function () {
132                                $item.removeClass('pxl-invisible').addClass('animated ' + data['animation']);
133                            }, data['animation_delay']);
134                        });
135
136                        $(this.slides).each(function(index){
137                            if(index == activeIndex)
138                                $(this).find('.wow').removeClass('pxl-invisible').addClass('animated');
139                            else
140                                $(this).find('.wow').removeClass('animated').addClass('pxl-invisible');
141                        });
142                        pxl_ken_burns(this);  
143                    },
144                },
145                autoHeight: true
146            };
147
148            if(settings['loop'] === 'true'){
149                carousel_settings['loop'] = true;
150            }
151            // auto play
152            if(settings['autoplay'] === 'true'){
153                carousel_settings['autoplay'] = {
154                    delay : settings['delay'],
155                    disableOnInteraction : settings['pause_on_interaction']
156                };
157            } else {
158                carousel_settings['autoplay'] = false;
159            }
160            // Effect
161            if(settings['slide_mode'] === 'cube'){
162                carousel_settings['cubeEffect'] = {
163                  shadow: false,
164                  slideShadows: false,
165                  shadowOffset: 0,
166                  shadowScale: 0, //0.94,
167                };
168            }
169            if(settings['slide_mode'] === 'coverflow'){
170                carousel_settings['centeredSlides'] = true;
171                carousel_settings['coverflowEffect'] = {
172                  rotate: 50,
173                  stretch: 0,
174                  depth: 100,
175                  modifier: 1,
176                  slideShadows: false,
177                };
178            }
179             
180        
181        carousel.each(function(index, element) {
182            
183            var swiper = new Swiper(carousel, carousel_settings);
184             
185            if(settings['autoplay'] === 'true' && settings['pause_on_hover'] === 'true'){
186                $(this).on({
187                    mouseenter: function mouseenter() {
188                        this.swiper.autoplay.stop();
189                    },
190                    mouseleave: function mouseleave() {
191                        this.swiper.autoplay.start();
192                    }
193                });
194            }
195        });   
196
197        function pxl_ken_burns(item) {
198		    //if(settings['ken_burns'] == 'true'){ 
199	    	var activeIndex = item.activeIndex; 
200            var current = item.slides.eq(activeIndex);
201            if(current.find('.pxl-ken-burns').length > 0){
202	            $('.pxl-slide-bg').removeClass('pxl-ken-burns--active');
203	            current.find('.pxl-slide-bg').addClass('pxl-ken-burns--active');
204	        }
205		    //}
206	  	} 
207    };
208    // Make sure you run this code under Elementor.
209    $( window ).on( 'elementor/frontend/init', function() {
210        elementorFrontend.hooks.addAction( 'frontend/element_ready/pxl_slider.default', pxl_slider_handler );
211    } );
212} )( 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.