Hi Sorry for the long winded question title,
I have multiple instance of mmenu on a page, 3x to be exact. Basically when one is open I need to be able to open another. This works but Im getting a flash of white content when I do so.
What I really want to do is to delay firing the second until after first has closed.
I have successfully set up delays using setTimeout or CSS transition and an if else statement but because the mmenu function is also called outside of the if/else it just fires as soon as I click on the anchor to trigger it.
I'm relatively new to javascript/jquery but I'm sure there is a way to get this done.
$("#open-menu").mmenu({
offCanvas: {
position: "right",
zposition: "front"
}
});
$("#new-menu").mmenu({
classes: "mm-fullscreen",
offCanvas: {
position: "left",
zposition: "front"
}
});
$(".close-menu").click(function() {
$("#new-menu, #open-menu").trigger("close.mm");
});
Excuse any sloppy code. This is the basic setup.