Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

138
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!