Black Friday 2026 50% off every plan Our biggest deal of the year on #1 Joomla products.
Ends in 12d 16h 10m 48s
Claim 50% off
Awaiting an answer Templates

Off-canvas menu on mobile - one-page mode

Asked by Petr 1 year ago Last activity 1 year 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

5 replies

Atick Eashrak Shuvo Staff

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

Petr Asked this

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

Thank You.

Petr

Petr Asked this

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

Petr Asked this

Hi, Pavel,
super, it works now.

Thank you.

Petr

Atick Eashrak Shuvo Staff

Hello Petr,

Please marked the issue as solved.

Petr Asked this

SOLVED.

Log in to reply.