- This topic has 2 replies, 2 voices, and was last updated 4 years, 4 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › Smooth menu // by @fainder
Hello,
I have found a cool accordion menu by @fainder and I want to adapte to my own menu
I have created a PEN, but has a little issue in child submenu “C > I have submenu”, anyone with more experience in this type of programmation that help me?
issue: when open child submenu, close the parent.
https://codepen.io/Vulkanus/pen/NWPqYLV
Thank you
I think it depends on what you want here. But the problem is in the condition if (!e.data.multiple)
.
If you remove that, all items toggle their submenu, but don’t have effect on each other.
When you don’t feel comfortable in doing such changes, maybe the best thing to do is find another menu function that does the work for you.
@JeroenR
Thank you for your answer. I understand that, but I don´t need to remove it, if you change the false to true (this.multiple = multiple || true;) , it will do the stuff, but like you said, it will remove the effect on each other.
“maybe the best thing to do is find another menu function that does the work for you.”
I see, and I can do it, but I like this one :)
Also I´will check another.
thank you again