OnePage Menu Remains Visible - Question | JoomShaper

OnePage Menu Remains Visible

hanish

hanish

Helix Framework 1 year ago

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?

0
6 Answers
Pavel
Pavel
Accepted Answer
1 year ago #101004

Hi.

Create custom.js file following Helix documentation. And add the following code to it by choosing one of the options.

  1. 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');
    });
});
  1. 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');
    });
});
2
Accepted Answer
1 year ago #101014

0
hanish
hanish
Accepted Answer
1 year ago #101015

Wow! Thx Pavel! No.1 is exactly what i needed :)

0
Pavel
Pavel
Accepted Answer
1 year ago #101016

You are wellcome :)

0
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 1 year ago #101022

Thanks a lot, Pavel

0
S
ssnobben
Accepted Answer
1 year ago #109355

Thks Pavel. Should be some Q&A about issues like this..

0