jquery - Revert mmenu back to the panel with the selected item when closed -
i've been tooling around jquery mmenu plugin found here mmenu.
the menu render correct sub-panel long add class="selected" appropriate li tag. i'm looking way revert panel upon closing if user happened navigate sub-menus without making selection. thus, next time open menu, it's set panel opened when page loaded.
if use demo, open menu, click arrow about us sub-menu, click arrow the team sub-menu, don't make selection , click hamburger icon close menu. upon opening menu again, you're on the team menu rather menu displayed when page first loaded. know how revert menu top level menu on closing using closeallpanels(), can't figure out how panel original selected li.
any suggestions?
it looks can accomplished following:
menu.bind( "closed", function() { menu.openpanel($('li.mm-selected').closest('.mm-panel')); });
Comments
Post a Comment