How to open one 3 level menu at a time with bootstrap

186 Views Asked by At

I'm building a responsive navigation using the DDRMenu Module in DNN.

The menu I am working on has 3 levels. You can see it on http://lumenis.bondtest.nl/test-inner-menu

It's about this menu

The mobile version (resolution below 770px) is styled differently ofcourse. It's not working on hover but on click.

Now I want to have only 1 third menu open at the time. Now you can open all the menu at the same time which makes a really long list.

See:

mobile version 2 third menus open

This is my code:

    <nav class="navbar navbar-default lumenisInnerMenu">
    <div class="container-fluid">
        <div class="navbar-header">
              <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
              </button>
        </div>
        <div class="collapse navbar-collapse lumenisListItems" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                [*>NODE]
            </ul>
        </div>
    </div>
</nav>

[>NODE]
    <li class="[?SELECTED]dir current[/?][?NODE]HasChildren child[=DEPTH] dropdownmenu [/?]">
    [?ENABLED]
        <a [?!NODE] href="[=URL]" [/?] [?TARGET]target="[=TARGET]"[/?] class="[?NODE]dropdown-toggle[/?]" data-toggle="collapse" data-target="#[=ID]">
            <div class="textsubitem">
                <span>[=TEXT]</span>
            </div>
        </a>
    [?ELSE]
        <a href="#" [?NODE] [/?]> [?NODE]
            <span>[=TEXT]</span>[/?]
        </a>
    [/?]
    [?NODE]
        <ul class="dropdown-menu dropdown[=DEPTH]" id="[=ID]">
            [*>NODE]
        </ul>
    [/?]
    </li>
[/>]

How to solve?

Thanks in advance.

0

There are 0 best solutions below