How to Collapse Mobile Navigation on Click in Bootstrap 3

Check out my other posts and tutorials on Web Development!

When building a single page, scrolling Bootstrap theme, a common issue you may run into is the mobile navigation remains visible when you click on a menu item. Here is an easy jQuery fix:

$('.navbar-collapse ul li a').click(function() {
    $('.navbar-toggle:visible').click();
});

Check out my personal site on a mobile device to see it in action!

Leave a Reply

Contact Us

Subscribe

Subscribe to our blog to receive latest news and tutorials on Web Design, Development, SEO, and more!