What is happening? 第三级菜单与下拉菜单重叠。
Goal? 第三级菜单应位于下拉菜单之外。
What have I tried so far? 我刚刚在浏览器中的Web Developer Modus中将内联css添加到第二个菜单级别。
<ul role="menu" class=" dropdown-menu" style="display: none; left: 11rem; top: -0.5rem; width: min-content;">
<li id="menu-item-400" class="nav-item menu-item menu-item-type-post_type menu-item-object-page menu-item-400 open"><a title="Öffentlichkeitsarbeit" href="http://localhost:38080/oeffentlichkeitsarbeit" class="dropdown-item">Öffentlichkeitsarbeit</a></li>
</ul>
left: 11rem; top: -0.5rem; width: min-content;
How can I change the javascript to add a the css class .open only for the menu in the second level? Or is a solution in wp_bootstrap_navwalker.php better?
jQuery(function($) {
if($(window).width()>769){
$(\'.navbar .dropdown\').hover(function() {
$(this).find(\'.dropdown-menu\').first().stop(true, true).delay(250).slideDown();
}, function() {
$(this).find(\'.dropdown-menu\').first().stop(true, true).delay(100).slideUp();
});
$(\'.navbar .dropdown > a\').click(function(){
location.href = this.href;
});
} });