Skip to main content

Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #300079
    vulkanus
    Participant

    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

    #300082
    JeroenR
    Participant

    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.

    #300083
    vulkanus
    Participant

    @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

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.