Hi,
Is there a way to change how the menus are shown on a mobile site?
(I have the ‘Mobile detect plugin’ installed)
With the Antimatter theme, the menus on a mobile are looking like this:
Not that easy to use, so I would like to ask if there is something I can change so that the menus are displayed in expanded mode instead of having the ‘+’ sign in front of the menus.
first of all sorry for my english.
I have had the same problem with ‘big’ fingers.
My idea was to modify the quark template to have the menu text act as button additionally to the plus/minus sign.
I am a newbie in web-development therefore my solution may be a bad hack and someone can provide a better (correct) solution for this problem.
I added the following code at line 63 in jquery.treemenu.js:
This pulls the text out of the submenus parent and adds it to the toggler.
The text of the submenus parent is replaced by a line break.
In the first place I tried to hide the submenus parent but then the layout of the menu gets messed up.
Additionally you have to adjust font sizes and margins for the toggler in _mobile.scss to match the style of the rest of the menu:
Thanks for your reply. (and sorry for my bad english)
I’ll do the changes as you’ve explained it and I’ll let you know what the result is.
I was thinking in the same direction as you but was not sure of myself.
Thank you “pmo”, it helped a lot! To get a bit a wider tab-range and that Submenu Point colored when active, I put two more lines in your code (the css has to be customized):
… anchor.attr(“href”,"#");
toggler.css({“cssText” : “padding-right: calc(100% - 220px)” });
if (e.children().hasClass(“active”)) { toggler.css({“cssText” : “color: var(–color1); opacity: 1 !important; font-weight: 600; padding-right: calc(100% - 220px)” })};
});