One Page Website , Hide Menu On Click - Question | JoomShaper
Black Friday sale is live with flat 50% OFF. Sale ends soon! Grab your deal now!

One Page Website , Hide Menu On Click

P

Pedros

Template 3 years ago

HI, site: https://kancelariapsn.pl/ How to make the menu hide after clicking when I have a page in one page type

0
3 Answers
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 3 years ago #94792

I copied JS code from one of those topics:

// Offcanvas hack for one page website
var nav_collapse = $('.offcanvas-menu .menu');
nav_collapse.click('li a', function(event) {
       event.preventDefault();
    $('.offcanvas-init').removeClass('offcanvas-active');
});

AND 2nd solution

For us, the single line at the end of main.js now works:

jQuery('.offcanvas-menu .menu').click(function(){jQuery('.close-offcanvas').trigger('click')});

Personally I cannot give you guarantee: if and how it works.

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 3 years ago #94791

Hi,

By default is not possible, it request extra changes in template main.js file. There were at least two topics on forum with solutions made by users.

0
P
Pedros
Accepted Answer
2 years ago #96862

THX

0