Disabling submenus under certain dimensions
-
Good morning,
What code can I use to disable submenus under custom sizes?
I wish the submenus were not enabled under 1120 px, is it possible?
Thanks
Carlo
-
Hi Carlo,
The only way to do that would be to set the Responsive Breakpoint to 1120px in the menu theme. Then in the menu item settings, enable the “Hide submenu on mobile” option.
Regards,
TomHi Tom,
thanks for your answer!
I’m using the Responsive Breakpoint, but I don’t use two different menus
I use the same Max Mega horizontal Menu that, through additional css, becomes a scroll menu below 1120 px.With the css (display: none) I can hide submenu, but I don’t know how to disable the event/javascript.
Thanks again
Hi m4rr,
but I don’t know how to disable the event/javascript.That is what makes it complicated.
It would require custom JavaScript to unbind the events on the parent items. This is outside of the scope of support (it could turn into hours of work and it is not
a supported feature), but you need to monitor the screen size then do something like this:$(".mega-menu-item-has-children > a.mega-menu-link").unbind();Regards,
TomHi Tom,
thank you very much for your answer.
I understood what do you mean.
But, in your opinion, can it make sense to use only one Max Mega Menu and make it responsive with additional css?
Sorry, i’m a beginner
CarloHi Carlo,
I do not understand sorry. MMM has 2 “states” – desktop and mobile. You can control the width at which the desktop menu becomes a mobile menu by adjusting the Responsive Breakpoint setting.
Regards,
TomHi Tom,
may be i’m wrong.
I’m using only desktop menu because i dont want toggle menu for mobile (i want horizontal menu for desktop and for mobile) Is possibile to have horizontal mobile menu instead of vertical toggle?Thanks
Carlo
Hi Carlo,
It isn’t possible to have a horizontal mobile menu.
All I can think you could do is create 2 menus: one with sub menus, one without, and display each one using CSS based on the screen size.
Regards,
TomHi Tom,
thanks for the answer
i tried to create 2 menus, in which position should I put them?
Hi m4rr,
That is up to you. Usually it would be in the header.php file, but it depends on your theme.
Regards,
TomHi Tom,
I think I have solved it.
I took your suggestion, I created two menus (one on the topbar and one for mobile devices / Hueman Theme), I set Responsive Breakpoint on MMM at 20px, so only horizontal desktop menus are active.
Thank you very much Tom (sorry for my english)
Carlo
Hi Carlo,
Good to hear you found a solution! 🙂
Regards,
Tom
The topic ‘Disabling submenus under certain dimensions’ is closed to new replies.