adgsm / multi-level-push-menu

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

Handle Expand Menu and Cancel Expand Operation #162

Open mehmetalidumlu opened 7 years ago

mehmetalidumlu commented 7 years ago

Hi, I use this plugin for layer control. I must close layers quickly on map. But when i click close icon on li item then menu expand. I want handle it.

screenshot_5

Can anybody help me for this problem? Thanks...

adgsm commented 7 years ago

I guess you could do something like following...

$( '#your_close_icon_handler' ).on( 'click' , function( ev ){
   // use ev (event) argument to prevent default click behavior and propagation,
   // and then collapse menu...
   $('#menu').multilevelpushmenu( 'collapse' );
} );