[Solved] Bootstrap toggle doesn´t work when a link is clicked


Having the menu collapse when a link is clicked is not the default functionality of the expand/collapse menu with bootstrap. If you want it to function that way, you have to bind the hide function .collapse('hide') to the click action for those links.

You can do so by including this:

jQuery(function($){
    $('.navbar-default .navbar-nav > li > a').click(function() {
        $('.navbar-default .navbar-collapse').collapse('hide')
    });
});

0

solved Bootstrap toggle doesn´t work when a link is clicked