I want to convert my page to ONE PAGE - but my menu (offcanvas) remains visible when clicked - I have to manually close it every time. Is it possible to change it?
Is there any special template or solution for ONEPAGE websites?
Solved
Helix Framework
OnePage menu remains visible
Accepted answer
Marked as the solution
Pavel
Hi.
Create custom.js file following Helix documentation. And add the following code to it by choosing one of the options.
- Click on any link in the menu will close it
jQuery(function($){
$('.offcanvas-inner ul.menu > li > a').bind('click', function(){
$('.close-offcanvas').trigger('click');
});
});
- Click only by the link you need will close it. To do this, add your own class to link in the menu item settings. And change this in the script to your class.
jQuery(function($){
$('.YOUR_OWN_CLASS').bind('click', function(){
$('.close-offcanvas').trigger('click');
});
}); 5 more replies
Deleted user
3 years ago
· edited
hanish Asked this
Wow! Thx Pavel!
No.1 is exactly what i needed :)
Pavel
You are wellcome :)
Ofi Khan Staff
Thanks a lot, Pavel
ssnobben
Thks Pavel. Should be some Q&A about issues like this..
Log in to reply.