Url Links Don't Close The Megamenu - Question | JoomShaper
Black Friday sale is live with flat 50% OFF. Sale ends soon! Grab your deal now!

Url Links Don't Close The Megamenu

F

Fabrice

Helix Framework 3 years ago

Hi, I have a project based on Artion template. I need to have some of my secondary links to be url links cause they are calling anchors in the page. My problem is that if I am already in the page where my anchors are, the link works but doesn't close up the megamenu leaving the user with the sensation that nothing happened. Except that it happened in the back of the dropdown.

You may try the https://www.studio-449.com/demo6 -> nos valeurs the page nos valeurs opens up, yet, if you go back to the menu and select "Encadrement de qualité", the links doesn't close the megamenu. Now, if you go back to the index or any other pages, click on the Nos Valeurs -> Encadrement de qualité" directly, it works fine.

So in the end : How can I have my url links to work and close the megamenu drop down at any time.

Thanks. Let me know if you need admin accesses

0
5 Answers
JK
Johan Korteland
Accepted Answer
3 years ago #75758

Hi Fabrice,

Just had sort of the same problem with anchor links in the offcanvas menu. Solved it by putting this code in the 'Custom Javascript' section, so no hack. ;)

I've modified the id's and classes to your website.

jQuery(document).ready(function($){'use strict'; $('.sp-dropdown-inner .sp-dropdown-items li a').click(function () { $('#modal-menu-toggler').trigger('click'); }); });

Give it a try and let me know.

Regards, Johan

0
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 3 years ago #75789

Hi Fabrice,

Thanks for your query.

If you want, you can use one of our onepage templates to get anchor menus working within offcanvas.

However, you can have a look into the following thread if it helps:

https://archive.joomshaper.com/forums/one-page-website-helix-ultimate#reply-164955

Best Regards

0
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 3 years ago #75790

Thanks @Johan Korteland for your collaboration:)

0
JK
Johan Korteland
Accepted Answer
3 years ago #75791

Hi Rashida,

No problem. Happy to help. Don't know if the script also works for the megamenu but it did work for the offcanvas. ;)

Regards, Johan

0
F
Fabrice
Accepted Answer
3 years ago #76014

Thanks Johan, works like a charm.

0