sidebar menu change dynamically

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

Text formatting options
Submit

Replies (3)

Hi,

You can refer to this post.

Regards.

Your Support Matters!

We will highly appreciate your Metronic Review on Themeforest.
Please go to Themeforest Downloads page, select Metronic & leave your feedback.

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.

Deleted comment
Text formatting options
Submit
Text formatting options
Submit