Website not mobile optimized - links with anchor does not work

Hi,

My name is Erik and I´ve bought a customized theme package from HubSpots partner -The Hubguru. They don´t reply on any mails what so ever and i am in urgent need for help.

My website are now finished, but when shown on mobile it does not work correctly.

I can see that the following does not work when you press the menu bar in the top right corner when using mobile phone:

1. Link to “fornøyde kunder = satisfied customers”

2. Link to “om oss = about us”

Link to website: www.thewalk.no (mobile version).

The support team at HubSpot has been amazing throughout this whole process, but i have been told that the reason for this error, is that the anchor link is working but the menu will not close. I need help to add a script that will close out the menu after someone clicks a link on it.

Is there someone out there that please could help me fixing these issues?

Best regards,

Erik.

Hey @Thewalk44,

Edit your Custom/page/Moose_Theme_2017/Moose_Script.js file and paste this at the bottom, after everything else:

$(function() {
 $('.mainmenu a[href*="#sec"]').on('click', function() {
 $('body').removeClass('mobile-open');
 $('.mainmenu .hs-menu-wrapper').slideUp();
 });
});

Hope it works.

Best,

-Radu

Hi,

Thanks man :slightly_smiling_face: Much appreciated!

Hopefully it will work.

Best,

Erik.

I think you also need to add this to the CSS file (also after everything else) to prevent affecting the desktop version:

@media (min-width: 768px) {
 .mainmenu .hs-menu-wrapper {
 display: block !important;
 overflow: visible !important;
 }
}

Great! Thank you so much.

You saved the day :slightly_smiling_face:

Best,

Erik.

Thanks for the effort and help, it finally works :slightly_smiling_face:

Best regards,

Erik.