diff --git a/assets/js/menu-min.js b/assets/js/menu-min.js index b0fed48..efdec8e 100644 --- a/assets/js/menu-min.js +++ b/assets/js/menu-min.js @@ -1 +1 @@ -!function($){const e=$("#main-navigation"),t=$("#nav-icon");let n=$(".zight-mobile-tab-toggle");if($('a[href*="#"]').not('[href="#"]').not('[href="#0"]').not('[href="#main-content"]').not(".features_buttons_acc a").click((function(e){if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname){var t=$(this.hash);(t=t.length?t:$("[name="+this.hash.slice(1)+"]")).length&&(e.preventDefault(),$("html, body").animate({scrollTop:t.offset().top},1e3,(function(){var e=$(t);if(e.focus(),e.is(":focus"))return!1;e.attr("tabindex","-1"),e.focus()})))}})),document.addEventListener("DOMContentLoaded",(function(){var e=document.querySelectorAll(".site-header"),t;document.querySelectorAll(".sub_menu_back").forEach((function(t){t.addEventListener("click",(function(t){t.preventDefault();var n=this.closest(".sub_menu"),i=$(n).parent().find(".menu-item-main-link");i.length&&i.focus(),n&&n.classList.remove("active"),e.forEach((function(e){e.classList.remove("site-header-active")}))}))})),$(window).innerWidth()>=768&&($("#menu_search_btn").on("click",(function(){var e=$(".search-popup");e.length&&(e.addClass("active"),$(this).attr("aria-expanded","true"),$("#modal_search").focus())})),$("#modal_search").on("input",(function(){var e=$(".search-popup");e.length&&e.addClass("input-active")})),$("#close-search").on("click",(function(){var e=$(".search-popup");e.length&&(e.removeClass("active"),$("#menu_search_btn").attr("aria-expanded","false"),$("#menu_search_btn").focus())})))})),$(window).innerWidth()<=768){var i=$(".menu-item-main-link"),a=$(".site-header");i.on("click",(function(e){if(e.preventDefault(),0==$(this).hasClass("menu-item-no-drop")){$(this).toggleClass("active"),$(this).parent().toggleClass("active");var t=$(this).siblings(".sub_menu");t.length&&t.toggleClass("active"),a.toggleClass("site-header-active");let e,n=$(this).siblings(".sub_menu").find(".menu-column").find("a[href], button:not([disabled])").first();n.length&&n.focus()}}))}document.querySelector(".mobile_help_btn .btn").addEventListener("keydown",(function(n){var i;"Tab"===n.key&&(n.preventDefault(),$(".site-header").removeClass("site-header-active"),$(".menu-item-main-link").removeClass("active"),$(".main-nav-link-li").removeClass("active"),document.querySelectorAll(".sub_menu.active").forEach((function(e){e.classList.remove("active")})),$(t).toggleClass("open"),"false"===$(t).attr("aria-expanded")?$(t).attr("aria-expanded","true"):$(t).attr("aria-expanded","false"),!e.hasClass("menu-mobile-open")&&e.toggleClass("menu-mobile-open"),$(window).scrollTop()>40?$("#header-top").toggle():$("#header-top").slideToggle(),$(".primary-navigation").toggleClass("active"),$("html, body").animate({scrollTop:$(window).scrollTop()},100),$("html").toggleClass("overflow-hidden"))})),t.click((function(){var t;$(".site-header").removeClass("site-header-active"),$(".menu-item-main-link").removeClass("active"),$(".main-nav-link-li").removeClass("active"),document.querySelectorAll(".sub_menu.active").forEach((function(e){e.classList.remove("active")})),$(this).toggleClass("open"),"false"===$(this).attr("aria-expanded")?$(this).attr("aria-expanded","true"):$(this).attr("aria-expanded","false"),!e.hasClass("menu-mobile-open")&&e.toggleClass("menu-mobile-open"),$(window).scrollTop()>40?$("#header-top").toggle():$("#header-top").slideToggle(),$(".primary-navigation").toggleClass("active"),$("html, body").animate({scrollTop:$(window).scrollTop()},100),$("html").toggleClass("overflow-hidden")})),$(".nav-icon").click((function(){var n;$(".site-header").removeClass("site-header-active"),$(".menu-item-main-link").removeClass("active"),$(".main-nav-link-li").removeClass("active"),document.querySelectorAll(".sub_menu.active").forEach((function(e){e.classList.remove("active")})),t.removeClass("open"),$(this).attr("aria-expanded","false"),e.removeClass("menu-mobile-open"),$(".primary-navigation").removeClass("active"),$("html, body").animate({scrollTop:$(window).scrollTop()},100),$("html").removeClass("overflow-hidden")}));var s=!0;$(window).on("resize",(function(){e.hasClass("menu-mobile-open")&&($(window).width()>880&&s?(t.click(),e.removeClass("menu-mobile-open"),$("html").removeClass("overflow-hidden"),s=!1):$(window).width()<=880&&!s&&(s=!0)),$(window).width()>768&&$(".zight-tab-content-nav .ul").css("display","flex"),$(window).width()<=768&&n.next().hide()})),$(".primary-navigation li.has-submenus button").attr("aria-expanded","false"),$(".primary-navigation li.has-submenus button").click((function(){$(this).attr("aria-expanded",(function(e,t){return"true"==t?(t="false",$(this).siblings(".sub_menu").removeClass("open")):($(".primary-navigation li.has-submenus button").each((function(e,t){"true"==$(t).attr("aria-expanded")&&($(t).attr("aria-expanded","false"),$(t).siblings(".sub_menu").removeClass("open"))})),t="true",$(this).siblings(".sub_menu").addClass("open").find(".menu-column:first-child .sub-menu li:first-child a").focus()),t}))})),$("a").keydown((function(e){13===e.keyCode&&setTimeout((function(){const e=window.innerHeight,t=document.querySelectorAll("#main-content a");for(let n=0;n=0&&a=1070&&($("#menu_search_btn").on("click",(function(){var e=$(".search-popup");e.length&&(e.addClass("active"),$(this).attr("aria-expanded","true"),$("#modal_search").focus())})),$("#modal_search").on("input",(function(){var e=$(".search-popup");e.length&&e.addClass("input-active")})),$("#close-search").on("click",(function(){var e=$(".search-popup");e.length&&(e.removeClass("active"),$("#menu_search_btn").attr("aria-expanded","false"),$("#menu_search_btn").focus())})))})),$(window).innerWidth()<=1070){var i=$(".menu-item-main-link"),a=$(".site-header");i.on("click",(function(e){if(e.preventDefault(),0==$(this).hasClass("menu-item-no-drop")){$(this).toggleClass("active"),$(this).parent().toggleClass("active");var t=$(this).siblings(".sub_menu");t.length&&t.toggleClass("active"),a.toggleClass("site-header-active");let e,n=$(this).siblings(".sub_menu").find(".menu-column").find("a[href], button:not([disabled])").first();n.length&&n.focus()}}))}document.querySelector(".mobile_help_btn .btn").addEventListener("keydown",(function(n){var i;"Tab"===n.key&&(n.preventDefault(),$(".site-header").removeClass("site-header-active"),$(".menu-item-main-link").removeClass("active"),$(".main-nav-link-li").removeClass("active"),document.querySelectorAll(".sub_menu.active").forEach((function(e){e.classList.remove("active")})),$(t).toggleClass("open"),"false"===$(t).attr("aria-expanded")?$(t).attr("aria-expanded","true"):$(t).attr("aria-expanded","false"),!e.hasClass("menu-mobile-open")&&e.toggleClass("menu-mobile-open"),$(window).scrollTop()>40?$("#header-top").toggle():$("#header-top").slideToggle(),$(".primary-navigation").toggleClass("active"),$("html, body").animate({scrollTop:$(window).scrollTop()},100),$("html").toggleClass("overflow-hidden"))})),t.click((function(){var t;$(".site-header").removeClass("site-header-active"),$(".menu-item-main-link").removeClass("active"),$(".main-nav-link-li").removeClass("active"),document.querySelectorAll(".sub_menu.active").forEach((function(e){e.classList.remove("active")})),$(this).toggleClass("open"),"false"===$(this).attr("aria-expanded")?$(this).attr("aria-expanded","true"):$(this).attr("aria-expanded","false"),!e.hasClass("menu-mobile-open")&&e.toggleClass("menu-mobile-open"),$(window).scrollTop()>40?$("#header-top").toggle():$("#header-top").slideToggle(),$(".primary-navigation").toggleClass("active"),$("html, body").animate({scrollTop:$(window).scrollTop()},100),$("html").toggleClass("overflow-hidden")})),$(".nav-icon").click((function(){var n;$(".site-header").removeClass("site-header-active"),$(".menu-item-main-link").removeClass("active"),$(".main-nav-link-li").removeClass("active"),document.querySelectorAll(".sub_menu.active").forEach((function(e){e.classList.remove("active")})),t.removeClass("open"),$(this).attr("aria-expanded","false"),e.removeClass("menu-mobile-open"),$(".primary-navigation").removeClass("active"),$("html, body").animate({scrollTop:$(window).scrollTop()},100),$("html").removeClass("overflow-hidden")}));var s=!0;$(window).on("resize",(function(){e.hasClass("menu-mobile-open")&&($(window).width()>880&&s?(t.click(),e.removeClass("menu-mobile-open"),$("html").removeClass("overflow-hidden"),s=!1):$(window).width()<=880&&!s&&(s=!0)),$(window).width()>1070&&$(".zight-tab-content-nav .ul").css("display","flex"),$(window).width()<=1070&&n.next().hide()})),$(".primary-navigation li.has-submenus button").attr("aria-expanded","false"),$(".primary-navigation li.has-submenus button").click((function(){$(this).attr("aria-expanded",(function(e,t){return"true"==t?(t="false",$(this).siblings(".sub_menu").removeClass("open")):($(".primary-navigation li.has-submenus button").each((function(e,t){"true"==$(t).attr("aria-expanded")&&($(t).attr("aria-expanded","false"),$(t).siblings(".sub_menu").removeClass("open"))})),t="true",$(this).siblings(".sub_menu").addClass("open").find(".menu-column:first-child .sub-menu li:first-child a").focus()),t}))})),$("a").keydown((function(e){13===e.keyCode&&setTimeout((function(){const e=window.innerHeight,t=document.querySelectorAll("#main-content a");for(let n=0;n=0&&a= 768) { + if ($(window).innerWidth() >= 1070) { $('#menu_search_btn').on('click', function() { var $popup = $('.search-popup'); if ($popup.length) { @@ -104,7 +104,7 @@ }); - if ($(window).innerWidth() <= 768) { + if ($(window).innerWidth() <= 1070) { var $mainLinks = $(".menu-item-main-link"); var $sideHeader = $('.site-header'); @@ -246,11 +246,11 @@ } } - if ($(window).width() > 768) { + if ($(window).width() > 1070) { $('.zight-tab-content-nav .ul').css('display', 'flex'); } - if ($(window).width() <= 768) { + if ($(window).width() <= 1070) { mobileToggle.next().hide(); } }); diff --git a/template-parts/blocks/tabbed-content/tabbed-content.php b/template-parts/blocks/tabbed-content/tabbed-content.php index 92ff8ff..850d4d2 100644 --- a/template-parts/blocks/tabbed-content/tabbed-content.php +++ b/template-parts/blocks/tabbed-content/tabbed-content.php @@ -157,10 +157,7 @@ class="tabbed-content__content__pane -
-
-
-
+