CMS Development

Thewalk44
Miembro

Website not mobile optimized - links with anchor does not work

resolver

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. 

 

0 Me gusta
2 Soluciones aceptadas
RMR
Solución
Participante

Website not mobile optimized - links with anchor does not work

resolver

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

Ver la solución en mensaje original publicado

0 Me gusta
RMR
Solución
Participante

Website not mobile optimized - links with anchor does not work

resolver

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;
    }
}

Ver la solución en mensaje original publicado

0 Me gusta
5 Respuestas 5
RMR
Solución
Participante

Website not mobile optimized - links with anchor does not work

resolver

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

0 Me gusta
RMR
Solución
Participante

Website not mobile optimized - links with anchor does not work

resolver

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;
    }
}
0 Me gusta
Thewalk44
Miembro

Website not mobile optimized - links with anchor does not work

resolver

Great! Thank you so much. 

 

You saved the day 🙂

 

Best,

 

Erik. 

0 Me gusta
Thewalk44
Miembro

Website not mobile optimized - links with anchor does not work

resolver

Thanks for the effort and help, it finally works 🙂

 

Best regards,

 

Erik. 

0 Me gusta
Thewalk44
Miembro

Website not mobile optimized - links with anchor does not work

resolver

Hi,

 

Thanks man 🙂 Much appreciated! 

 

Hopefully it will work. 

 

Best, 

 

Erik. 

0 Me gusta