adgsm / multi-level-push-menu

MultiLevelPushMenu jQuery Plugin implementation
http://multi-level-push-menu.dzunic.net
804 stars 213 forks source link

How to get menu level on 'onExpandMenuStart' and 'onCollapseMenuStart'? #183

Open mehmetalidumlu opened 6 years ago

mehmetalidumlu commented 6 years ago

Hi, I cant catch root menu is open or close. I want hide or show a html element when root menu is opening or closing. 'onExpandMenuStart' and 'onCollapseMenuStart' event is run all menu process and returns only 'options' parameters in function.

How can get menu level which it is processing?

Thanks...

adgsm commented 6 years ago
/**
 * Active (last expanded) menu level
 * Returns active menu level object, or false if menu is fully collapsed
 */
$('#menu').multilevelpushmenu('activemenu');

Please note "data-level" attribute in returned object.