Create Multiple Instances of ResponsiveMultiLevelMenu with unique trigger ID's #27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I would assume the best option (i may be wrong here) to have is another Option called something like triggerClassName (or ID) to trigger a target menu when using multiple instances of the plugin. Trigger should be able to work from outside of the menu container for the sake of better layout control. The reason for removing the button outside of the menu is so the menu can have a width that is separate from the button & container.
This addition was added to the script so multiple instances could be used : #7
The reason for this request to have the trigger outside of the menu is for better control over the menu width. As you can see in this screenshot is during the animation the menu is displaying the width of the container (which is determined by how many characters are in the label).

The overall objective is to use multiple menus, and have the buttons to display inline without affecting the width of the menus. Currently the way that the trigger button is inside the container, overlapping would not work due to z-indexing issues. Currently i've achieved a temporary fix by setting a no-wrap overflow style to the container and a fixed-width to the menus which works, but you can see the menu showing a more narrow width that reflects the width of the button-trigger during animation. Also, in mobile mode, the menus are set to 100% width, but the triggers had to be absolutely positioned to be clickable, but it runs into more z-indexing issues. Relative positioning would be much more ideal.
These next two screenshots are Mobile view, and the menus are set to full-width 100% so there is no problem with the width during the animation. Also, the button were positioned absolutely for now, but relative would be ideal and can be accomplished once the buttons are working from outside the container.