Off-canvas Menu On Mobile - One-page Mode - Question | JoomShaper

Off-canvas Menu On Mobile - One-page Mode

P

Petr

Template 11 months ago

Hello, with previous templates I was used to the fact that when moving around the page using the menu (one-page web mode) ON MOBILE after clicking on the off-canvas menu item this menu disappears like here www.bajecnezenyvbehu.cz It doesn't disappear here (Luxyort template) the menu covers the display. www.tricamp.cz Can this be set somewhere to disappear it?

Thank you.

Petr

0
8 Answers
Atick Eashrak Shuvo
Atick Eashrak Shuvo
Accepted Answer
Support Agent 11 months ago #175824

Hello Petr,

Apologize for the issue you're experiencing. Please add the following JS code to your Template Options -> Custom Code -> Custom JS

$(document).on("click", ".offcanvas-inner a[href^='#']", function (event) {
    // Check if the link is an anchor link (same page)
    if ($(this).attr("href").length > 1) {
        $(".offcanvas-init").removeClass("offcanvas-active"); // Close the Offcanvas menu
    }
});

This should resolve the problem. Please let us know if you need any further assistance!

Best regards

0
P
Petr
Accepted Answer
11 months ago #175860

It doesn't work as I want. Please check my code input. I don't know JS.

Thank You.

Petr

0
P
Petr
Accepted Answer
10 months ago #178829

I've tried inserting the code into some other templates, but it doesn't work. Can you recommend any templates that have "hiding the menu" working and are therefore good for one-page websites? Thank You.

Petr

0
Pavel
Pavel
Accepted Answer
10 months ago #178830
0
Atick Eashrak Shuvo
Atick Eashrak Shuvo
Accepted Answer
Support Agent 10 months ago #178864

Thank you Pavel for your support.

0
P
Petr
Accepted Answer
10 months ago #178847

Hi, Pavel, super, it works now.

Thank you.

Petr

0
Atick Eashrak Shuvo
Atick Eashrak Shuvo
Accepted Answer
Support Agent 10 months ago #178863

Hello Petr,

Please marked the issue as solved.

0
P
Petr
Accepted Answer
10 months ago #178872

SOLVED.

0