1(function($, window, document) { 2 "use strict"; 3 $(window).on("scroll load", function() { 4 if ($(this).scrollTop() >= 30) { 5 if ($(".site-header.header_trans-fixed").length) { 6 $(".site-header.header_trans-fixed").not(".fixed-dark").addClass("pix-header-fixed"); 7 $(".fixed-dark").addClass("bg-fixed-dark"); 8 $(".sticky-logo, .header-button-scroll").show(); 9 $(".main-logo, .header-button-default").hide() 10 } 11 if ($(".right-menu.modern").length) { 12 $(".right-menu.modern").closest(".fixed-header").addClass("fixed-header-scroll") 13 } 14 } else { 15 if ($(".site-header.header_trans-fixed").length) { 16 $(".site-header.header_trans-fixed").not(".fixed-dark").removeClass("pix-header-fixed"); 17 $(".fixed-dark").removeClass("bg-fixed-dark"); 18 $(".sticky-logo, .header-button-scroll").hide(); 19 $(".main-logo, .header-button-default").show() 20 } 21 if ($(".right-menu.modern").length) { 22 $(".right-menu.modern").closest(".fixed-header").removeClass("fixed-header-scroll") 23 } 24 } 25 }); 26 27 28 if ($(window).width() >= $(".menu-wrapper").data("top")) { 29 $('.site-main-menu li:not(.menu-item-has-children) > a[href^="#"]').on("click", function(e) { 30 e.preventDefault(); 31 var elem = $(this).attr("href"); 32 if ($(elem).length) { 33 $("html,body").animate({ 34 scrollTop: $(elem).offset().top - $(".header_trans-fixed").outerHeight() - $("#wpadminbar").outerHeight() 35 }, "slow") 36 } 37 }) 38 } 39 40 $(".toggle-menu").on("click", function(e) { 41 e.preventDefault(); 42 $("html").addClass("no-scroll sidebar-open").height(window.innerHeight + "px"); 43 if ($("#wpadminbar").length) { 44 $(".sidebar-open .site-nav").css("top", "46px") 45 } else { 46 $(".sidebar-open .site-nav").css("top", "0") 47 } 48 }); 49 50 51 if ($('body').hasClass("admin-bar")) { 52 $('body').addClass('header-position'); 53 } 54 55 56 $(".close-menu").on("click", function(e) { 57 e.preventDefault(); 58 $("html").removeClass("no-scroll sidebar-open").height("auto") 59 }); 60 61 function menuArrows() { 62 var mobW = $(".menu-wrapper").attr("data-top"); 63 if (window.outerWidth < mobW || $(".site-header").hasClass("topmenu-arrow")) { 64 $(".site-header").addClass("mobile-header"); 65 if (!$(".menu-item-has-children i").length) { 66 $("header .menu-item-has-children").append('<i class="fa fa-angle-down"></i>'); 67 $("header .menu-item-has-children i").addClass("hide-drop") 68 } 69 $("header .menu-item-has-children i").on("click", function() { 70 if (!$(this).hasClass("animation")) { 71 $(this).parent().toggleClass("is-open"); 72 $(this).addClass("animation"); 73 $(this).parent().siblings().removeClass("is-open").find(".fa").removeClass("hide-drop").prev(".sub-menu").slideUp(250); 74 if ($(this).hasClass("hide-drop")) { 75 if ($(this).closest(".sub-menu").length) { 76 $(this).removeClass("hide-drop").prev(".sub-menu").slideToggle(250) 77 } else { 78 $(".menu-item-has-children i").addClass("hide-drop").next(".sub-menu").hide(250); 79 $(this).removeClass("hide-drop").prev(".sub-menu").slideToggle(250) 80 } 81 } else { 82 $(this).addClass("hide-drop").prev(".sub-menu").hide(100).find(".menu-item-has-children a").addClass("hide-drop").prev(".sub-menu").hide(250) 83 } 84 } 85 setTimeout(removeClass, 250); 86 87 function removeClass() { 88 $("header .site-main-menu i").removeClass("animation"); 89 90 } 91 }) 92 } else { 93 $("header .menu-item-has-children i").remove(); 94 $(".site-header").removeClass("mobile-header"); 95 } 96 } 97 98 99 100 101 $(".additional-nav").on("click", function(e) { 102 e.preventDefault(); 103 $(".additional-menu-wrapper").addClass("menu-open"); 104 $(".menu-wrapper").addClass("additional-menu-open") 105 });
106 $(".additional-nav-close, .additional-menu-overlay").on("click", function() { 107 $(".additional-menu-wrapper").removeClass("menu-open"); 108 $(".menu-wrapper").removeClass("additional-menu-open") 109 }); 110 $(window).on("ready", function() { 111 }); 112 113 $(window).on("load resize", function() { 114 menuArrows(); 115 }); 116 window.addEventListener("orientationchange", function() { 117 menuArrows() 118 }); 119})(jQuery, window, document);
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.