Archived topic
Off canvas mobile only custom call
3 replies · Started by Jason on July 20, 2020
I am using the following code within a sticky topbar to create a mobile bar menu
<div style="flex-grow: 1;
flex-basis: 0;"><a class="button mobbar slideout-toggle custom-slideout-toggle icon-menu" href="#">Menu</a></div>
If I only allow Off Canvas menu for mobile it stops working. It works if OC menu is activated site wide, however I do not wish for the canvas menu to be available on desktop, nor it js files to be called.
How can I successfully use the slideout toggle on this setup for mobile/tablet alone?
Thanks
Hi there,
Setting it to mobile makes it so the standard menu toggle works as the toggle.
You could always set it to "On" and then hide the toggle on desktop. Setting it to mobile-only still loads those resources on desktop, so there's no difference there.
Let me know if you need help hiding the toggle :)
OK Thanks Tom.
Easy CSS fix to hide it, just had hoped there was a better solution than 'hide it under the rug'!
Appreciate your help
No problem! :)