Issue with accordion submenu

I created a yamm menu with accordeon. My issue is that when clicking on the accordeon the submenu closes itself after collapsing. See here for the video. And see here for the menu

I can give you a temporary fix with CSS but you really need a js fix to keep the open class on the menu parent when you click the accordion.

Here’s the temporary CSS fix.

li.dropdown:hover > ul{
display:block;
}

You’ll have to wait for a js guru for the real fix :slight_smile:

3 Likes

Thank you @PaulOB I applied your suggestion locally and it seems to be working.

I noticed another issue with the submenu’s width which goes outside my window. Any idea on how to keep it inside ?

I tried it in Vivaldi (the browser I use without restrictions) and it works perfectly:

1 Like

I’m not seeing that happen either.

Also for the CSS only fix you may want to keep the red border open on the top menu item when hovered.

e.g.

li.dropdown:hover > ul {
  display: block;
}
.navbar-nav li.dropdown:hover > a {
  float: none;
  background: #fff !important;
  color: #888;
  border-radius: 5px 5px 0px 0px !important;
  border: 3px #af1317 solid !important;
  border-bottom: 3px #fff solid !important;
  padding: 15px 12px 17px 12px;
}