jQuery(document).ready(function ($) { function toggleMegaMenu() { if ($(window).width() <= 1280 && $(window).width() >= 991) { $(".top-menu-main > li > a").off("click").on("click", function (e) { var $this = $(this); var $submenu = $this.siblings(".wp-block-navigation-submenu"); if ($submenu.length > 0) { e.preventDefault(); if ($submenu.hasClass("menu-open")) { $submenu.removeClass("menu-open").slideUp(); } else { $(".top-menu-main .wp-block-navigation-submenu.menu-open").removeClass("menu-open").slideUp(); $submenu.addClass("menu-open").slideDown(); } } else { return true; } }); } } toggleMegaMenu(); $(window).on("resize", function () { toggleMegaMenu(); }); }); jQuery(document).ready(function ($) { if ($(window).width() <= 991) { $('.top-menu-main ul ul').hide(); $(".top-menu-main li.has-child > a").on("click", function (e) { var $this = $(this); var $submenu = $this.siblings("ul"); if ($submenu.is(":visible")) { $submenu.slideUp(); $this.removeClass("active"); return true; } else { $this.closest("ul").find("ul:visible").slideUp().siblings("a").removeClass("active"); $submenu.slideDown(); $this.addClass("active"); } e.preventDefault(); }); $(".top-menu-main li.has-child ul li a").on("click", function () { window.location = $(this).attr("href"); }); } }); jQuery(document).ready(function ($) { if ($(window).width() <= 990) { setTimeout(() => { $('.top-menu-main li').each(function (index) { if ($(this).children('ul').length > 0 && $(this).children('ul').find('li').length > 0) { if (!$(this).children('a, button').find('.lsubmenu-arrow').length) { $(this).children('a, button').append('
'); } } }); }, 800); } }); jQuery(document).ready(function ($) { $('form .w2dc-search-form-button .w2dc-btn-primary').html('Suche'); $('.w2dc-directory-frontpanel .w2dc-btn.w2dc-btn-primary').html('Adresse vorschlagen'); $('.w2dc-directory-frontpanel .w2dc-btn.w2dc-btn-primary:nth-child(3)').html('Ausdruck'); $('.w2dc-directory-frontpanel .w2dc-btn.w2dc-btn-primary:nth-child(4)').html('Als PDF speichern'); $('.w2dc-form-control.w2dc-selectmenu-w2dc-category').parent().prepend('Was suchst Du?'); $('.w2dc-has-feedback.w2dc-dropdowns-menu-locations-autocomplete').parent().prepend('Wo suchst Du?'); $("input[name='what_search']").attr('placeholder', 'Wähle die Branche'); $("input[name='address']").attr('placeholder', 'Wähle den Ort'); $('.w2dc-listings-block .w2dc-btn-block').html('Weitere Einträge anzeigen'); $(window).scroll(function () { if($(window).width() > 991) { var $this = $(this), $head = $('.main-container-header > .header-inner > .header-inner__child:nth-child(1)'), $title = $('.main-container-header .header-inner > .header-inner__child h2'), $logo = $('.main-container-header .header-inner > .header-inner__child figure a img'), $navitem = $('.main-container-header nav .wp-block-navigation__responsive-container-content > ul > li > a'), $logoCon = $('.header_logo figure'), $menuSticky = $('.top-menu-main'), $TopMenu_item = $('.top-menu-main > li'), $navCont = $('.nav_container'); if ($this.scrollTop() > 0) { $title.css({ // 'display': 'none' 'font-size': '0px', 'transition': 'all 0.2s' }); $logo.css({ 'width': '80px', 'height': '50px' }); $logoCon.css({ 'margin-top': '10px', 'margin-bottom': '5px' }); $navitem.css({ 'padding': '17.5px 19px', }); $navCont.css('justify-content', 'center'); $TopMenu_item.css('min-height', '60px'); // $menuSticky.css('margin-top', '-11px'); // $head.css('padding-top', '0px'); } else { $title.css({ // 'display': 'flex' 'font-size': '32px', 'transition': 'all 0.2s' }); $TopMenu_item.css('min-height', 'inherit'); $logo.css({ 'width': '100px', 'height': '100px' }); $logoCon.css({ 'margin-top': '15px', 'margin-bottom': '10px' }); $navitem.css({ 'padding': '9.5px 19px', }); $menuSticky.css('margin-top', '4px'); $navCont.css('justify-content', 'flex-end'); // $head.css('padding-top', '20px'); } } }); }); jQuery(document).ready(function( $ ){ $( "