PageSourceSearch

https://www.ebtrans.com/wp-content/plugins/sticky-header-effects-f…/assets/js/she-header.js?ver=1.6.9

js ebtrans.com collected 2026-10-10 02:35:12 UTC 14,156 bytes, 339 lines download raw bytes

1var $j = jQuery.noConflict();
2
3$j( document ).ready( function() {
4	"use strict";
5	// She header
6	sheHeader();
7} );
8	
9
10/* ==============================================
11HEADER EFFECTS
12============================================== */
13
14
15function sheHeader() {
16		
17	var header = $j('.elementor-element.she-header-yes'),
18		container = $j('.she-header-yes .elementor-container, .elementor-element.she-header-yes.e-con'),
19		header_elementor = $j('.elementor-edit-mode .she-header-yes'),
20		header_logo = $j('.she-header-yes .elementor-widget-theme-site-logo img:not(.elementor-widget-n-menu img), .she-header-yes .elementor-widget-image img:not(.elementor-widget-n-menu img)'),
21        header_logo_div = $j('.she-header-yes .elementor-widget-theme-site-logo a::after, .she-header-yes .elementor-widget-image a::after');
22		data_settings = header.data('settings');
23						
24	if ( typeof data_settings != 'undefined' ) {
25		var responsive_settings = data_settings["transparent_on"];
26		var width = $j(window).width(),
27		    header_height= header.height(),
28			logo_width = header_logo.width(),
29			logo_height = header_logo.height() ;
30		}
31							
32	// Check responsive is enabled
33	if( typeof width != 'undefined' && width) {
34	if( width >= 1025 ) {
35	var enabled = "desktop";
36	}else if (width  > 767 && width < 1025  ) {
37	var enabled = "tablet";
38	}else if (width <= 767 ) {
39	var enabled = "mobile";
40	}
41	}
42	
43	if ($j.inArray(enabled, responsive_settings)!='-1') {
44								
45	var scroll_distance = data_settings["scroll_distance"];
46	var transparent_header = data_settings["transparent_header_show"];
47	var	background = data_settings["background"];
48	var bottom_border_color = data_settings["custom_bottom_border_color"],
49		bottom_border_view = data_settings["bottom_border"],
50		bottom_border_width = data_settings["custom_bottom_border_width"];
51								
52	var shrink_header = data_settings["shrink_header"],
53		data_height = data_settings["custom_height_header"],
54		data_height_tablet = data_settings["custom_height_header_tablet"],
55		data_height_mobile = data_settings["custom_height_header_mobile"];
56
57	var shrink_logo = data_settings["shrink_header_logo"],
58		data_logo_height = data_settings["custom_height_header_logo"],
59		data_logo_height_tablet = data_settings["custom_height_header_logo_tablet"],
60		data_logo_height_mobile = data_settings["custom_height_header_logo_mobile"];
61	
62	var change_logo_color = data_settings["change_logo_color"];
63		
64	var blur_bg  = data_settings["blur_bg"];
65	
66	var scroll_distance_hide_header = data_settings["scroll_distance_hide_header"];
67	
68	// add transparent class
69	if(transparent_header == "yes" ){
70		header.addClass('she-header-transparent-yes');
71	}
72		
73		// header height shrink
74                if (typeof data_height != "undefined" && data_height) {
75                    if (width >= 1025) {
76                        var shrink_height = data_height["size"];
77                    } else if (width > 767 && width < 1025) {
78                        var shrink_height = data_height_tablet["size"];
79                        if (shrink_height == "") {
80                            shrink_height = data_height["size"];
81                        }
82                    } else if (width <= 767) {
83                        var shrink_height = data_height_mobile["size"];
84                        if (shrink_height == "") {
85                            shrink_height = data_height["size"];
86                        }
87                    }
88                }
89
90                // Logo height shrink
91                if (
92                    typeof data_logo_height != "undefined" &&
93                    data_logo_height
94                ) {
95                    if (width >= 1025) {
96                        var shrink_logo_height = data_logo_height["size"];
97                    } else if (width > 767 && width < 1025) {
98                        var shrink_logo_height =
99                            data_logo_height_tablet["size"];
100                    } else if (width <= 767) {
101                        var shrink_logo_height =
102                            data_logo_height_mobile["size"];
103                    }
104
105                    //Calc New width and height
106                    if (shrink_logo_height == "") {
107                        //Get logo shrink settings from desktop
108                        shrink_logo_height = data_logo_height["size"];
109
110                        if (shrink_logo_height == "") {
111                            // Shrink same settings from height shrink option
112                            shrink_logo_height = shrink_height;
113
114                            var percent =
115                                    parseInt(shrink_logo_height) /
116                                    parseInt(header_height),
117                                width_l = logo_width * percent,
118                                height_l = logo_height * percent;
119                        } else {
120                            var width_l =
121                                    (logo_width * shrink_logo_height) / 100,
122                                height_l =
123                                    (logo_height * shrink_logo_height) / 100;
124                        }
125                    } else {
126                        //Get logo shrink settings from the responsive option
127                        var width_l = (logo_width * shrink_logo_height) / 100,
128                            height_l = (logo_height * shrink_logo_height) / 100;
129                    }
130                }
131							
132		// border bottom
133		if( typeof bottom_border_width != 'undefined' && bottom_border_width) {
134		var bottom_border = bottom_border_width["size"] + "px solid " + bottom_border_color;
135		}
136						
137		// hide header on scroll
138                if (
139                    typeof scroll_distance_hide_header != "undefined" &&
140                    scroll_distance_hide_header
141                ) {
142                    var mywindow = $j(window),
143                        mypos = mywindow.scrollTop();
144
145                    mywindow.scroll(function () {
146                        var sd_hh_s = scroll_distance_hide_header["size"],
147                            sd_hh_u = scroll_distance_hide_header["unit"],
148                            sd_hh_tablet =
149                                data_settings[
150                                    "scroll_distance_hide_header_tablet"
151                                ],
152                            sd_hh_tablet_s = sd_hh_tablet["size"],
153                            sd_hh_tablet_u = sd_hh_tablet["unit"],
154                            sd_hh_mobile =
155                                data_settings[
156                                    "scroll_distance_hide_header_mobile"
157                                ],
158                            sd_hh_mobile_s = sd_hh_mobile["size"],
159                            sd_hh_mobile_u = sd_hh_mobile["unit"];
160
161                        // get responsive view
162                        if (
163                            typeof scroll_distance_hide_header != "undefined" &&
164                            scroll_distance_hide_header
165                        ) {
166                            if (width >= 1025) {
167                                var sd_hh = sd_hh_s,
168                                    sd_hh_u = sd_hh_u;
169                                // calc sise for vh unit
170                                if (sd_hh_u == "vh") {
171                                    sd_hh = window.innerHeight * (sd_hh / 100);
172                                }
173                            } else if (width > 767 && width < 1025) {
174                                var sd_hh = sd_hh_tablet_s,
175                                    sd_hh_u = sd_hh_tablet_u;
176
177                                if (sd_hh == "") {
178                                    sd_hh = sd_hh_s;
179                                }
180                                // calc sise for vh unit
181                                if (sd_hh_u == "vh") {
182                                    sd_hh = window.innerHeight * (sd_hh / 100);
183                                }
184                            } else if (width <= 767) {
185                                var sd_hh = sd_hh_mobile_s,
186                                    sd_hh_u = sd_hh_mobile_u;
187
188                                if (sd_hh == "") {
189                                    sd_hh = sd_hh_s;
190                                }
191                                // calc sise for vh unit
192                                if (sd_hh_u == "vh") {
193                                    sd_hh = window.innerHeight * (sd_hh / 100);
194                                }
195                            }
196                        }
197
198                        // added option for vh unit
199                        //if(sd_hh_u == 'px'){
200                        //	sd_hh  = sd_hh_s;
201                        //} else {
202                        //	sd_hh  = (window.innerHeight)*(sd_hh_s/100);
203                        //}
204
205                        if (mypos > sd_hh) {
206                            if (mywindow.scrollTop() > mypos) {
207                                header.addClass("headerup");
208                            } else {
209                                header.removeClass("headerup");
210                            }
211                        }
212                        mypos = mywindow.scrollTop();
213                    });
214                }
215					
216		// scroll function
217                $j(window).on("load scroll", function (e) {
218                    var scroll = $j(window).scrollTop();
219
220                    if (header_elementor) {
221                        header_elementor.css("position", "relative");
222                    }
223
224                    var sd_s = scroll_distance["size"],
225                        sd_u = scroll_distance["unit"],
226                        sd_tablet = data_settings["scroll_distance_tablet"],
227                        sd_tablet_s = sd_tablet["size"],
228                        sd_tablet_u = sd_tablet["unit"],
229                        sd_mobile = data_settings["scroll_distance_mobile"],
230                        sd_mobile_s = sd_mobile["size"],
231                        sd_mobile_u = sd_mobile["unit"];
232
233                    // get responsive view
234                    if (
235                        typeof scroll_distance != "undefined" &&
236                        scroll_distance
237                    ) {
238                        if (width >= 1025) {
239                            var sd = sd_s,
240                                sd_u = sd_u;
241                            // calc sise for vh unit
242                            if (sd_u == "vh") {
243                                sd = window.innerHeight * (sd / 100);
244                            }
245                        } else if (width > 767 && width < 1025) {
246                            var sd = sd_tablet_s,
247                                sd_u = sd_tablet_u;
248
249                            if (sd == "") {
250                                sd = sd_s;
251                            }
252                            // calc sise for vh unit
253                            if (sd_u == "vh") {
254                                sd = window.innerHeight * (sd / 100);
255                            }
256                        } else if (width <= 767) {
257                            var sd = sd_mobile_s,
258                                sd_u = sd_mobile_u;
259
260                            if (sd == "") {
261                                sd = sd_s;
262                            }
263                            // calc sise for vh unit
264                            if (sd_u == "vh") {
265                                sd = window.innerHeight * (sd / 100);
266                            }
267                        }
268                    }
269
270                    //console.log(sd_s );
271                    //console.log(sd_u );
272                    //console.log(window.innerHeight );
273                    //console.log(sd );
274                    //console.log(scroll );
275                    //console.log(bottom_shadow);
276								
277			if (scroll >= scroll_distance["size"]) {
278				header.removeClass('header').addClass("she-header");
279				header.css("background-color", background);
280				header.css("border-bottom", bottom_border);
281				header.removeClass('she-header-transparent-yes');
282				
283				if( shrink_header == "yes" ) {
284					header.css({"padding-top":"0", "padding-bottom":"0", "margin-top":"0", "margin-bottom":"0"});
285					container.css({"min-height": shrink_height, "transition":"all 0.4s ease-in-out", "
285-webkit-transition":"all 0.4s ease-in-out", "-moz-transition":"all 0.4s ease-in-out"});				
286				}
287				
288// 				console.log(data_height["size"] + "px");
289				
290				if( change_logo_color == "yes" ) {
291					header_logo.addClass("change-logo-color");
292				}
293								
294				if( blur_bg == "yes" ) {
295					header.css({"backdrop-filter": "saturate(180%) blur(20px)", "-webkit-backdrop-filter": "saturate(180%) blur(20px)"});					
296				}
297				
298				// ---------------------------------- SHRINK LOGO
299                        if (shrink_logo == "yes") {
300                            header_logo.css({
301                                width: width_l,
302                                transition: "all 0.4s ease-in-out",
303                                "-webkit-transition": "all 0.4s ease-in-out",
304                                "-moz-transition": "all 0.4s ease-in-out",
305                            });
306                        }
307										
308				} else {
309					header.removeClass("she-header").addClass('header');
310					header.css("background-color", "");
311					header.css("border-bottom", "");
312				
313					if(transparent_header == "yes" ){
314						header.addClass('she-header-transparent-yes');
315					}
316					if( shrink_header == "yes" ) {
317						header.css({"padding-top":"", "padding-bottom":"", "margin-top":"", "margin-bottom":""});
318						container.css("min-height", "");
319					}
320					
321					// ---------------------------------- SHRINK LOGO
322                        if (shrink_logo == "yes") {
323                            header_logo.css({ height: "", width: "" });
324                        }
325					
326					if( change_logo_color == "yes" ) {
327					header_logo.removeClass("change-logo-color");
328										
329				}
330					if( blur_bg == "yes" ) {
331						header.css({"backdrop-filter": "", "-webkit-backdrop-filter": ""});
332					}
333				}
334
335				
336		});
337	}
338	
339};

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.