Topic: Mobile Menu Doesn\'t Close/Hide with Selection
normduquette pro asked 7 years ago
rl pro answered 7 years ago
normduquette pro commented 7 years ago
Thanks, I got it to work I tried one way and then tried your method, both worked the same: To help others out, just add one of the following methods between the script tags at the bottom of the page <pre>//close mobile menu on click - method 1 $('.navbar-nav>li>a').on('click', function(){ $('.navbar-collapse').collapse('hide'); }); //close mobile menu on click - method 2 $('.navbar-nav>li>a').on('click', function(){ $('.navbar-collapse').removeClass('show'); });</pre>FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- ForumUser: Pro
- Premium support: No
- Technology: Other
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No