-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I destroy instance of the menu ? #48
Comments
Use a media query and display none on the mega menu. Then display block on your custom menu. |
What if I want to use the same menu for both mobile and desktop so doing a display none is not an option? I'm using a CMS and trying to be SEO conscious to not duplicate navigation links that would confuse Google's bots. Are there any methods for destroying and re-initializing the megamenu js on resize? My event handlers won't function over top of the libraries. |
I created a destroy function right below "setOptions" around line 825 Initiate |
@carlafranca Hi, Can you please elaborate further on how can I use the above destroy function. I need to turn-off megamenu below certain resolution and bind different events(touch -tap/doubleTap) Many thanks in advance. Regards, Mark W |
@pbhar28 Hi Mark, yes sure. Here is how I use it. 1. On load:Start the plugin only on specific size:
2. On window resize I call one of the functions below depending on the browser size:
On my implementation I remove all the "aria" on links and dropdowns added by the plugin (It will be added again once the plugin is restarted)
|
I need this function for responsivness, below X pixels i would like to destroy instance of mega menu, and use casual CSS Menu, or my own JS.
The text was updated successfully, but these errors were encountered: