PageSourceSearch

https://nerdlouisville.org/wp-content/plugins/calmor-core/inc/parallax/assets/js/scripts.js?ver=1.0.0

js nerdlouisville.org collected 2026-10-01 15:00:18 UTC 7,308 bytes, 186 lines download raw bytes

1!(function ($, ele) {
2    "use strict";
3    var $parallax = {
4        init: function () {
5            ele.hooks.addAction("frontend/element_ready/section", $parallax.elementorSection);
6            
7             var wow = new WOW({
8                animateClass: 'animated',
9                offset: 100,
10                mobile: false,
11                duration: 1000,
12            });
13            wow.init();
14        },
15        elementorSection: function (e) {
16            Boolean(ele.isEditMode());
17            new $renderParalax(e).init();
18        },
19    };
20
21    var $renderParalax = function( e ){
22        var $this = this;
23        var $id = e.data('id');
24        var $data = e.data('dl_parallax');
25        var $move = e.data('dl_move');
26
27        var $render = document.querySelector('#dl_parallax_ele-' + $id);
28        if( !e.data('dl_parallax') ){
29            if($render){
30                $data = JSON.parse($render.getAttribute('data-dl_parallax'));
31                $move = JSON.parse($render.getAttribute('data-dl_move'));
32            }
33        }
34        if(!$render){
35            e.prepend('<div id="dl_parallax_ele-'+$id+'" class="dl_parallax_ele-wrapper"></div>');
36            var $render = document.querySelector('#dl_parallax_ele-' + $id);
37        }
38        
39        $this.init = function(){
40            if( Array.isArray($data) && $render){
41                
42                $data.forEach(function($v, $k){
43                    
44                    var $idRep = $v._id;
45                    var item_source = $v.item_source;
46
47                    var $pDiv  = document.createElement('div');
48                    $pDiv.setAttribute('class', 'dl_parallax_element elementor-repeater-item-'+$idRep);
49                    $pDiv.setAttribute('style', 'position: absolute;');
50
51                    if($v.dl_hide_tablet == "hidden-tablet"){
52                        $pDiv.classList.add('dl-hidden-tablet');
53                        var tablet = window.matchMedia("(max-width: 1024px) and (min-width: 768px)");
54                        $this.tablateMedia(tablet);
55                        tablet.addListener($this.tablateMedia);
56                    }
57                    if($v.dl_hide_mobile == "hidden-phone"){
58                        $pDiv.classList.add('dl-hidden-mobile');
59                        var mobile = window.matchMedia("(max-width: 767px)");
60                        $this.mobileMedia(mobile);
61                        mobile.addListener($this.mobileMedia);
62                    }
63
64                    if($v.dl_wow_enable){
65                        $pDiv.classList.add('wow');
66                        if($v.dl_animation != null){
67                            $pDiv.classList.add($v.dl_animation);
68                        }
69                        if( $v.dl_animation_delay != ''){
70                            $pDiv.setAttribute('data-wow-delay', $v.dl_animation_delay+'s');
71                        }
72                        if( $v.dl_animation_duration != ''){
73                            $pDiv.setAttribute('data-wow-duration', $v.dl_animation_duration+'s');
74                        }
75                    }
76
77                    var $layer = document.createElement('div');
78                    $layer.setAttribute('class', 'layer');
79                    $layer.classList.add('layer'+$k);
80
81                    if($v.dl_item_depth){
82                        $layer.setAttribute('data-depth', $v.dl_item_depth);
83                    }
84                    
85                  
86                    var $settings = {};
87                    if($v.dl_parallax_data_popup){
88
89                        if($v.dl_translate_x_axix != ''){
90                            $settings.x = $v.dl_translate_x_axix;
91                        }
92                        if($v.dl_translate_y_axix != ''){
93                            $settings.y = $v.dl_translate_y_axix;
94                        }
95    
96                        if($v.dl_rotate_x_axix != ''){
97                            $settings.rotateX = $v.dl_rotate_x_axix;
98                        }
99                        if($v.dl_rotate_y_axix != ''){
100                            $settings.rotateY = $v.dl_rotate_y_axix;
101                        }
102                        if($v.dl_rotate_z_axix != ''){
103                            $settings.rotateZ = $v.dl_rotate_z_axix;
104                        }
105    
106                        if($v.dl_scale_x_axix != ''){
107                            $settings.scaleX = $v.dl_scale_x_axix;
108                        }
109                        if($v.dl_scale_y_axix != ''){
110                            $settings.scaleX = $v.dl_scale_y_axix;
111                        }
112    
113                        if($v.dl_scale_x_axix != ''){
114                            $settings.scaleX = $v.dl_scale_x_axix;
115                        }
116                        if($v.dl_scale_y_axix != ''){
117                            $settings.scaleX = $v.dl_scale_y_axix;
118                        }
119                        if($v.dl_scale_z_axix != ''){
120                            $settings.scaleZ = $v.dl_scale_z_axix;
121                        }
122                    }
123                    
124                    if(item_source == 'text'){
125
126                    }else if(item_source == 'icon'){
127
128                    } else{
129                        var $eleRen = document.createElement('img');
130                        $eleRen.setAttribute('src', $v.image.url);
131                        $eleRen.setAttribute('alt', '');
132                        //new Parallax($eleRen); 
133                    }
134
135                    
136                   
137                    $eleRen.setAttribute('data-parallax', JSON.stringify($settings));
138
139                    $layer.appendChild($eleRen);
140
141                    $pDiv.appendChild($layer);
142
143                    $render.appendChild($pDiv);
144                    
145                });
146                
147               //console.log($move.dl_parallaxmove_enable);
148
149                if($move.dl_parallaxmove_enable == 'yes'){
150                    e.parallax({
151                        scalarX: $move.dl_scalar_x_axix,
152                        scalarY: $move.dl_scalar_y_axix,
153                    });
154                }
155            }
156        }
157
158        $this.tablateMedia = function( $x){
159            if($x.matches){
160                document.querySelectorAll('.dl-hidden-tablet').forEach(function($v){
161                    $v.style.display = "none";
162                });
163            } else {
164                document.querySelectorAll('.dl-hidden-tablet').forEach(function($v){
165                    $v.style.display = "block";
166                });
167            }
168        }
169
170        $this.mobileMedia = function( $x){
171            if($x.matches){
172                document.querySelectorAll('.dl-hidden-mobile').forEach(function($v){
173                    $v.style.display = "none";
174                });
175            } else {
176                document.querySelectorAll('.dl-hidden-mobile').forEach(function($v){
177                    $v.style.display = "block";
178                });
179            }
180        }
181    }
182
183    
184    $(window).on("elementor/frontend/init", $parallax.init);
185    
186})(jQuery, window.elementorFrontend);

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.