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('.she-header-yes'), 18 container = $j('.she-header-yes .elementor-container'), 19 header_elementor = $j('.elementor-edit-mode .she-header-yes'), 20 header_logo = $j('.she-header-yes .elementor-widget-theme-site-logo img, .she-header-yes .elementor-widget-image img'), 21 data_settings = header.data('settings'); 22 23 if ( typeof data_settings != 'undefined' ) { 24 var responsive_settings = data_settings["transparent_on"]; 25 var width = $j(window).width(), 26 header_height= header.height(), 27 logo_width = header_logo.width(), 28 logo_height = header_logo.height() ; 29 } 30 31 // Check responsive is enabled 32 if( typeof width != 'undefined' && width) { 33 if( width >= 1025 ) { 34 var enabled = "desktop"; 35 }else if (width > 767 && width < 1025 ) { 36 var enabled = "tablet"; 37 }else if (width <= 767 ) { 38 var enabled = "mobile"; 39 } 40 } 41 42 console.log($j.inArray(enabled, responsive_settings)); 43 44 if ($j.inArray(enabled, responsive_settings)!='-1') { 45 46 var scroll_distance = data_settings["scroll_distance"]; 47 var transparent_header = data_settings["transparent_header_show"]; 48 var background = data_settings["background"]; 49 var bottom_border_color = data_settings["custom_bottom_border_color"], 50 bottom_border_view = data_settings["bottom_border"], 51 bottom_border_width = data_settings["custom_bottom_border_width"]; 52 53 var shrink_header = data_settings["shrink_header"], 54 data_height = data_settings["custom_height_header"], 55 data_height_tablet = data_settings["custom_height_header_tablet"], 56 data_height_mobile = data_settings["custom_height_header_mobile"]; 57 58 var shrink_logo = data_settings["shrink_header_logo"], 59 data_logo_height = data_settings["custom_height_header_logo"], 60 data_logo_height_tablet = data_settings["custom_height_header_logo_tablet"], 61 data_logo_height_mobile = data_settings["custom_height_header_logo_mobile"]; 62 63 var change_logo_color = data_settings["change_logo_color"]; 64 65 var blur_bg = data_settings["blur_bg"]; 66 67 var scroll_distance_hide_header = data_settings["scroll_distance_hide_header"]; 68 69 // add transparent class 70 if(transparent_header == "yes" ){ 71 header.addClass('she-header-transparent-yes'); 72 } 73 74 // header height shrink 75 if( typeof data_height != 'undefined' && data_height) { 76 if( width >= 1025 ) { 77 var shrink_height = data_height["size"]; 78 }else if (width > 767 && width < 1025 ) { 79 var shrink_height = data_height_tablet["size"]; 80 if(shrink_height == ''){ 81 shrink_height = data_height["size"]; 82 } 83 }else if (width <= 767 ) { 84 var shrink_height = data_height_mobile["size"]; 85 if(shrink_height == ''){ 86 shrink_height = data_height["size"]; 87 } 88 } 89 } 90 91 // logo height shrink 92 93 if( typeof data_logo_height != 'undefined' && data_logo_height) { 94 if( width >= 1025 ) { 95 96 var shrink_logo_height = data_logo_height["size"]; 97 if(shrink_logo_height == ''){ 98 shrink_logo_height = shrink_height; 99 100 var percent = parseInt(shrink_logo_height)/parseInt(header_height), 101 width = logo_width*percent, 102 height = logo_height*percent; 103 }else{ 104 width = logo_width*shrink_logo_height/100, 105 height = logo_height*shrink_logo_height/100; 106 } 107 108 }else if (width > 767 && width < 1025 ) { 109 110 var shrink_logo_height = data_logo_height_tablet["size"]; 111 if(shrink_logo_height == ''){ 112 shrink_logo_height = data_logo_height["size"]; 113 if(shrink_logo_height == ''){ 114 shrink_logo_height = shrink_height; 115 116 var percent = parseInt(shrink_logo_height)/parseInt(header_height), 117 width = logo_width*percent, 118 height = logo_height*percent; 119 }else{ 120 width = logo_width*shrink_logo_height/100, 121 height = logo_height*shrink_logo_height/100; 122 123 } 124 } 125 126 127 }else if (width <= 767 ) { 128 129 var shrink_logo_height = data_logo_height_mobile["size"]; 130 if(shrink_logo_height == ''){ 131 shrink_logo_height = data_logo_height["size"]; 132 if(shrink_logo_height == ''){ 133 shrink_logo_height = shrink_height; 134 135 var percent = parseInt(shrink_logo_height)/parseInt(header_height), 136 width = logo_width*percent, 137 height = logo_height*percent; 138 }else{ 139 width = logo_width*shrink_logo_height/100, 140 height = logo_height*shrink_logo_height/100; 141 } 142 } 143 144 145 146 } 147 } 148 149 // border bottom 150 if( typeof bottom_border_width != 'undefined' && bottom_border_width) { 151 var bottom_border = bottom_border_width["size"] + "px solid " + bottom_border_color; 152 } 153 154 155 // hide header on scroll 156 if( typeof scroll_distance_hide_header != 'undefined' && scroll_distance_hide_header) { 157 158 var mywindow = $j(window); 159 var mypos = mywindow.scrollTop(); 160 161 mywindow.scroll(function() { 162 if (mypos > scroll_distance_hide_header["size"]) { 163 if(mywindow.scrollTop() > mypos) 164 { 165 header.addClass('headerup'); 166 }else{ 167 header.removeClass('headerup'); 168 } 169 } 170 mypos = mywindow.scrollTop(); 171 }); 172 } 173 174 // scroll function 175 $j(window).on("load scroll",function(e){ 176 var scroll = $j(window).scrollTop(); 177 178 if (header_elementor) { 179 header_elementor.css("position", "relative"); 180 } 181 182 if (scroll >= scroll_distance["size"]) { 183 header.removeClass('header').addClass("she-header"); 184 header.css("background-color", background); 185 header.css("border-bottom", bottom_border); 186 header.removeClass('she-header-transparent-yes'); 187 188 if( shrink_header == "yes" ) { 189 header.css({"padding-top":"0", "padding-bottom":"0", "margin-top":"0", "margin-bottom":"0"}); 190 container.css({"min-height": shrink_height, "transition": "all 0.4s ease-in-out", "
190-webkit-transition": "all 0.4s ease-in-out", "-moz-transition": "all 0.4s ease-in-out"}); 191 192 } 193 194 if( shrink_logo == "yes" ) { 195 header_logo.css({"width": width, "transition": "all 0.4s ease-in-out", "-webkit-transition": "all 0.4s ease-in-out", "-moz-transition": "all 0.4s ease-in-out"}); 196 197 } 198 199 if( change_logo_color == "yes" ) { 200 header_logo.addClass("change-logo-color"); 201 202 } 203 204 if( blur_bg == "yes" ) { 205 header.css({"backdrop-filter": "saturate(180%) blur(20px)", "-webkit-backdrop-filter": "saturate(180%) blur(20px)"}); 206 207 } 208 209 } else { 210 header.removeClass("she-header").addClass('header'); 211 header.css("background-color", ""); 212 header.css("border-bottom", ""); 213 214 if(transparent_header == "yes" ){ 215 header.addClass('she-header-transparent-yes'); 216 } 217 if( shrink_header == "yes" ) { 218 header.css({"padding-top":"", "padding-bottom":"", "margin-top":"", "margin-bottom":""}); 219 container.css("min-height", ""); 220 } 221 if( shrink_logo == "yes" ) { 222 header_logo.css({"height":"", "width":""}); 223 } 224 if( change_logo_color == "yes" ) { 225 header_logo.removeClass("change-logo-color"); 226 227 } 228 if( blur_bg == "yes" ) { 229 header.css({"backdrop-filter": "", "-webkit-backdrop-filter": ""}); 230 } 231 } 232 233 234 }); 235 } 236 237};
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.