Using the jQuery mmenu plugin, I need to call a JavaScript function either after the menu has finished closing or simultaneously. In the documentation I can't see any suggestion for closing entire menu but only for closePanel. I need to insert in mmenu closing function another one (custom) to hide lightbox effect on the page.
<script type="text/javascript">
$(document).ready(function() {
$("#menu").mmenu({
"extensions": [
"theme-white"
],
"offCanvas": {
"zposition": "front"
},
"slidingSubmenus": false
});
$("#menu").show();
});
</script>
<script type="text/javascript">
function lightbox(){
(function($) {
// some stuff
})(jQuery);}
</script>
is there a way to bind another function after the plugin has been closed or better, when entire menu closing action?
you could try binding to the closing event
There is also a closed event too, so you can use which ever is appropriate