metismenu icon indicating copy to clipboard operation
metismenu copied to clipboard

Multi-level keep menu open

Open hacha82 opened this issue 9 years ago • 6 comments

Hello,

With the current version only the first sub-level (

hacha82 avatar Mar 13 '15 19:03 hacha82

I think I'm seeing the same thing here.

For example, if I have a 3 tier menu, and I click on an item in the third tier, the third tier doesn't remain open when the next page loads. This causes me to have to click back through the menus to get to the option I selected.

Any help on this would be awesome! I tried to just copy the basic template laid out on the demo.

ghost avatar Jun 15 '15 14:06 ghost

I'm having the same trouble.

simmogs avatar Jul 14 '15 20:07 simmogs

Same here. Did anyone get a fix?

ghiotion avatar Sep 18 '15 20:09 ghiotion

Same problem. Any ideas?

mpkhoury avatar Nov 27 '15 18:11 mpkhoury

#5

See the above issue. It requires modifying the source code but will give you what you want.

LorenDorez avatar Jul 05 '16 17:07 LorenDorez

try adding something like this in init function and make the child node active

      $(this._element)
        .find('li.' + this._config.activeClass)
        .parents('ul')
        .attr('aria-expanded', true)
        .addClass(this._config.collapseClass + ' ' + this._config.collapseInClass);

      $(this._element)
        .find('li.' + this._config.activeClass)
        .parents('li')
        .attr('aria-expanded', true)
        .addClass(this._config.activeClass);

muratsu avatar Dec 13 '16 08:12 muratsu