Hi,
I'm tring to open/close aside menu-item programmatically with javascript in admin panel Metronic > DEMO 1 . How to do that?
Thank you in advance
Hi,
you don't seem to understand my question or I didn't ask it correctly.
I want to ask if there is a way to open a certain menu (menu-item) with javascript from aside menu(accordion) when loading the page and when it is a sub-menu to open the parent items.
I also want to know how to save the status of the menu (which elements parents an child of the accordion are open) for example in a cookie and when I open a new page to select them with javascript.
Thanks
Hi,
Sorry, I got your question wrong.
In your case you can access the menu item element DOM which has the trigger attribute data-kt-menu-trigger
and just trigger the click event to toggle the submenu. So you can set ID or use javascript query metho to access the element's DOM.
Regards.
Hello,
you don't seem to understand my question or I didn't ask it correctly.
I want to ask if there is a way to open a certain menu (menu-item) with javascript from aside menu(accordion) when loading the page and when it is a sub-menu to open the parent items.
I also want to know how to save the status of the menu (which elements parents an child of the accordion are open) for example in a cookie and when I open a new page to select them with javascript.
Thanks