Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

152
Visualizações
close the mobile menu when clicking on the menu link

I need help with the mobile menu. I'm trying to find/add a script that closes the menu after clicking a menu link. Can anyone help?

Thus, when you click on a menu link, you access the section, but the menu is still open. So I need a script that it should menu after clicking menu link.

Here is my GitHub for this repository: https://github.com/Eric8306/Remparts

Thanks in advance for your help and your js script :) My menu htmlI tried some scripts I found on the web but it doesn't work. I am in training as a developer and I have not yet seen javascript, hence my problem. So I hope you can help me :)

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Add below the code in your js file. Also include js library in head.

$(document).on("click",".header__nav .menu__list", function(){
   $(".header__Hamburger").trigger("click");
});

Method 1:

if ($(window).width() < 768){
   $(document).on("click",".header__nav .menu__list", function(){
     $(".header__Hamburger").trigger("click");
   });
}
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda