Archived topic
Trigger Slideout Menu with secondary button
20 replies · Started by JANEK on August 21, 2018
What setting is it on? Make sure its on for both mobile and desktop :)
Finally, how do I replace the 'hamburger' with text? Thanks again!
Do you want to remove it and just leave the text? If so this:
.slideout-toggle a.button:before {
display: none;
}
And to get rid of the one in the Primary Nav then this:
@media (min-width: 769px) {
.sf-menu>li.slideout-toggle {
display: none;
}
}
On this topic, just in case anyone wanted to use a keyboard shortcut for the slide-out menu.
I wanted to use the "Escape" key for this but that causes a flicker, so use another instead, in this case the 'Delete' key :)
Other values you could use are listed here: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values
jQuery(document).ready(function($){
<!-- Start of Function -->
$(document).on('keydown', function ( e ) {
if (e.key == "Delete") {
$('.slideout-toggle a')[0].click();
}
});
<!-- END of Function -->
})
Thats great - thanks for sharing !
I don't use Off Canvas.