Mobile menu only clickable with > - Forum | JoomShaper
Solved Helix Framework

Mobile menu only clickable with >

Asked by MoneyPeet 4 years ago Last activity 4 years ago

Hello,

on this website when showing on a mobile device, the hamburger works.
BUT, when extending a menu item, you have to click on the > sign. Clicking on the title doesn't work.
Please see the video

Can you help me with this?

Regards, Peter

Accepted answer

Marked as the solution
Ofi Khan Staff

Hello Peter Spiegelenburg

Please use this JavaScript to Template Options -> Custom Code -> Custom JavaScript

jQuery(function($) {
    $(document).on("click", ".menu-deeper", function(event) {
        if (event.target.classList.contains('menu-toggler')) return;
        if (event.target.children.length) {
            event.preventDefault();
            event.stopPropagation();

            $(this)
                .toggleClass("menu-parent-open")
                .find(">.menu-child")
                .slideToggle(400);
        }
    });
});

Best regards

4 more replies

MoneyPeet Asked this

Hi Ofi Khan,

YES! this is working. Thank you so much.
Maybe it is helpful to add this default to the template? For future users?

Regards, Peter

Ofi Khan Staff

You are welcome. Not all users might want it. Anyway, we have the fix :)

I have a humble request. It would be very kind of you if you can manage some moment to give us feedback on Joomla Extension Directory. This will inspire us to improve.

MoneyPeet Asked this

Hi Ofi,

I just noticed that the home-button in the mobile doesn't work.
When you click on it, it only shows the submenu.
But Home itself is also a link.
Do you think this is fixable?

Regards, Peter

Ofi Khan Staff

Unfortunately, there is no known solution. If you want to expand with Menu Title, then you have to avoid linking the Menu Items.

Log in to reply.