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 she_offset = data_settings["she_offset_top"]; 47 var she_padding = data_settings["she_padding"]; 48 var she_width = data_settings["she_width"]; 49 var transparent_header = data_settings["transparent_header_show"]; 50 var background = data_settings["background"]; 51 var bottom_border_color = data_settings["custom_bottom_border_color"], 52 bottom_border_view = data_settings["bottom_border"], 53 bottom_border_width = data_settings["custom_bottom_border_width"]; 54 55 var shrink_header = data_settings["shrink_header"], 56 data_height = data_settings["custom_height_header"], 57 data_height_tablet = data_settings["custom_height_header_tablet"], 58 data_height_mobile = data_settings["custom_height_header_mobile"]; 59 60 var shrink_logo = data_settings["shrink_header_logo"], 61 data_logo_height = data_settings["custom_height_header_logo"], 62 data_logo_height_tablet = data_settings["custom_height_header_logo_tablet"], 63 data_logo_height_mobile = data_settings["custom_height_header_logo_mobile"]; 64 65 var change_logo_color = data_settings["change_logo_color"]; 66 67 var blur_bg = data_settings["blur_bg"]; 68 69 var scroll_distance_hide_header = data_settings["scroll_distance_hide_header"]; 70 71 // offset 72 if (width >= 1025) { 73 she_offset = data_settings["she_offset_top"]; 74 she_padding = data_settings["she_padding"]; 75 she_width = data_settings["she_width"]; 76 }else if (width > 767 && width < 1025) { 77 she_offset = data_settings["she_offset_top_tablet"]; 78 she_padding = data_settings["she_padding_tablet"]; 79 she_width = data_settings["she_width_tablet"]; 80 }else if (width <= 767) { 81 she_offset = data_settings["she_offset_top_mobile"]; 82 she_padding = data_settings["she_padding_mobile"]; 83 she_width = data_settings["she_width_mobile"]; 84 } 85 86 // add transparent class 87 if(transparent_header == "yes" ){ 88 header.addClass('she-header-transparent-yes'); 89 } 90 91 // header height shrink 92 if (typeof data_height != "undefined" && data_height) { 93 if (width >= 1025) { 94 var shrink_height = data_height["size"]; 95 } else if (width > 767 && width < 1025) { 96 var shrink_height = data_height_tablet["size"]; 97 if (shrink_height == "") { 98 shrink_height = data_height["size"]; 99 } 100 } else if (width <= 767) { 101 var shrink_height = data_height_mobile["size"]; 102 if (shrink_height == "") { 103 shrink_height = data_height["size"]; 104 } 105 } 106 } 107 108 // Logo height shrink 109 if ( 110 typeof data_logo_height != "undefined" && 111 data_logo_height 112 ) { 113 if (width >= 1025) { 114 var shrink_logo_height = data_logo_height["size"]; 115 } else if (width > 767 && width < 1025) { 116 var shrink_logo_height = 117 data_logo_height_tablet["size"]; 118 } else if (width <= 767) { 119 var shrink_logo_height = 120 data_logo_height_mobile["size"]; 121 } 122 123 //Calc New width and height 124 if (shrink_logo_height == "") { 125 //Get logo shrink settings from desktop 126 shrink_logo_height = data_logo_height["size"]; 127 128 if (shrink_logo_height == "") { 129 // Shrink same settings from height shrink option 130 shrink_logo_height = shrink_height; 131 132 var percent = 133 parseInt(shrink_logo_height) / 134 parseInt(header_height), 135 width_l = logo_width * percent, 136 height_l = logo_height * percent; 137 } else { 138 var width_l = 139 (logo_width * shrink_logo_height) / 100, 140 height_l = 141 (logo_height * shrink_logo_height) / 100; 142 } 143 } else { 144 //Get logo shrink settings from the responsive option
145 var width_l = (logo_width * shrink_logo_height) / 100, 146 height_l = (logo_height * shrink_logo_height) / 100; 147 } 148 } 149 150 // border bottom 151 if( typeof bottom_border_width != 'undefined' && bottom_border_width) { 152 var bottom_border = bottom_border_width["size"] + "px solid " + bottom_border_color; 153 } 154 155 // hide header on scroll 156 if ( 157 typeof scroll_distance_hide_header != "undefined" && 158 scroll_distance_hide_header 159 ) { 160 var mywindow = $j(window), 161 mypos = mywindow.scrollTop(); 162 163 mywindow.scroll(function () { 164 var sd_hh_s = scroll_distance_hide_header["size"], 165 sd_hh_u = scroll_distance_hide_header["unit"], 166 sd_hh_tablet = 167 data_settings[ 168 "scroll_distance_hide_header_tablet" 169 ], 170 sd_hh_tablet_s = sd_hh_tablet["size"], 171 sd_hh_tablet_u = sd_hh_tablet["unit"], 172 sd_hh_mobile = 173 data_settings[ 174 "scroll_distance_hide_header_mobile" 175 ], 176 sd_hh_mobile_s = sd_hh_mobile["size"], 177 sd_hh_mobile_u = sd_hh_mobile["unit"]; 178 179 // get responsive view 180 if ( 181 typeof scroll_distance_hide_header != "undefined" && 182 scroll_distance_hide_header 183 ) { 184 if (width >= 1025) { 185 var sd_hh = sd_hh_s, 186 sd_hh_u = sd_hh_u; 187 // calc sise for vh unit 188 if (sd_hh_u == "vh") { 189 sd_hh = window.innerHeight * (sd_hh / 100); 190 } 191 } else if (width > 767 && width < 1025) { 192 var sd_hh = sd_hh_tablet_s, 193 sd_hh_u = sd_hh_tablet_u; 194 195 if (sd_hh == "") { 196 sd_hh = sd_hh_s; 197 } 198 // calc sise for vh unit 199 if (sd_hh_u == "vh") { 200 sd_hh = window.innerHeight * (sd_hh / 100); 201 } 202 } else if (width <= 767) { 203 var sd_hh = sd_hh_mobile_s, 204 sd_hh_u = sd_hh_mobile_u; 205 206 if (sd_hh == "") { 207 sd_hh = sd_hh_s; 208 } 209 // calc sise for vh unit 210 if (sd_hh_u == "vh") { 211 sd_hh = window.innerHeight * (sd_hh / 100); 212 } 213 } 214 } 215 216 // added option for vh unit 217 //if(sd_hh_u == 'px'){ 218 // sd_hh = sd_hh_s; 219 //} else { 220 // sd_hh = (window.innerHeight)*(sd_hh_s/100); 221 //} 222 223 if (mypos > sd_hh) { 224 if (mywindow.scrollTop() > mypos) { 225 header.addClass("headerup"); 226 } else { 227 header.removeClass("headerup"); 228 } 229 } 230 mypos = mywindow.scrollTop(); 231 }); 232 } 233 234 // scroll function 235 $j(window).on("load scroll", function (e) { 236 var scroll = $j(window).scrollTop(); 237 238 if (header_elementor) { 239 header_elementor.css("position", "relative"); 240 } 241 242 var sd_s = scroll_distance["size"], 243 sd_u = scroll_distance["unit"], 244 sd_tablet = data_settings["scroll_distance_tablet"], 245 sd_tablet_s = sd_tablet["size"], 246 sd_tablet_u = sd_tablet["unit"], 247 sd_mobile = data_settings["scroll_distance_mobile"], 248 sd_mobile_s = sd_mobile["size"], 249 sd_mobile_u = sd_mobile["unit"]; 250 251 // get responsive view 252 if ( 253 typeof scroll_distance != "undefined" && 254 scroll_distance 255 ) { 256 if (width >= 1025) { 257 var sd = sd_s, 258 sd_u = sd_u; 259 // calc sise for vh unit 260 if (sd_u == "vh") { 261 sd = window.innerHeight * (sd / 100); 262 } 263 } else if (width > 767 && width < 1025) { 264 var sd = sd_tablet_s, 265 sd_u = sd_tablet_u; 266 267 if (sd == "") { 268 sd = sd_s; 269 } 270 // calc sise for vh unit 271 if (sd_u == "vh") { 272 sd = window.innerHeight * (sd / 100); 273 } 274 } else if (width <= 767) { 275 var sd = sd_mobile_s, 276 sd_u = sd_mobile_u; 277 278 if (sd == "") { 279 sd = sd_s; 280 } 281 // calc sise for vh unit 282 if (sd_u == "vh") { 283 sd = window.innerHeight * (sd / 100); 284 } 285 } 286 } 287 288 if (scroll >= scroll_distance["size"]) { 289 header.removeClass('header').addClass("she-header"); 290 header.css("background-color", background); 291 header.css("border-bottom", bottom_border); 292 293 header.css("top", she_offset.size + she_offset.unit); 294 295 if (width >= 768) { 296 if ( document.body.classList.contains('admin-bar') ) { 297 header.css("top", (32 + she_offset.size) + she_offset.unit); 298 } 299 } 300 301 header.css("padding-top", she_padding.top + she_padding.unit); 302 header.css("padding-bottom", she_padding.bottom + she_padding.unit); 303 header.css("padding-left", she_padding.left + she_padding.unit); 304 header.css("padding-right", she_padding.right + she_padding.unit); 305 header.css("width", she_width.size + she_width.unit); 306 // header.attr("style", "width: " + she_width.size + she_width.unit + " !important;"); 307 // header.css("width", she_width.size + she_width.unit); 308 309 header.removeClass('she-header-transparent-yes'); 310 311 if( shrink_header == "yes" ) { 312 header.css({"padding-top":"0", "padding-bottom":"0", "margin-top":"0", "margin-bottom":"0"}); 313 container.css({"min-height": shrink_height, "transition":"all 0.4s ease-in-out", "
313-webkit-transition":"all 0.4s ease-in-out", "-moz-transition":"all 0.4s ease-in-out"}); 314 } 315 316 if( change_logo_color == "yes" ) { 317 header_logo.addClass("change-logo-color"); 318 } 319 320 // ---------------------------------- SHRINK LOGO 321 if (shrink_logo == "yes") { 322 header_logo.css({ 323 width: width_l, 324 transition: "all 0.4s ease-in-out", 325 "-webkit-transition": "all 0.4s ease-in-out", 326 "-moz-transition": "all 0.4s ease-in-out", 327 }); 328 } 329 330 } else { 331 header.removeClass("she-header").addClass('header'); 332 header.css("background-color", ""); 333 header.css("border-bottom", ""); 334 header.css("top", ""); 335 header.css("padding-top", ""); 336 header.css("padding-bottom", ""); 337 header.css("padding-left", ""); 338 header.css("padding-right", ""); 339 header.css("width", ""); 340 341 if(transparent_header == "yes" ){ 342 header.addClass('she-header-transparent-yes'); 343 } 344 if( shrink_header == "yes" ) { 345 header.css({"padding-top":"", "padding-bottom":"", "margin-top":"", "margin-bottom":""}); 346 container.css("min-height", ""); 347 } 348 349 // ---------------------------------- SHRINK LOGO 350 if (shrink_logo == "yes") { 351 header_logo.css({ height: "", width: "" }); 352 } 353 354 if( change_logo_color == "yes" ) { 355 header_logo.removeClass("change-logo-color"); 356 357 } 358 359 } 360 361 362 }); 363 } 364 365};
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.