try this:
$('.nav a').on('click', function(){
$('.btn-navbar').click(); //bootstrap 2.x
$('.navbar-toggle').click(); //bootstrap 3.x by Richard
$('.navbar-toggler').click(); //bootstrap 4.x
});
More Related Contents:
- How to change the bootstrap css width into 1000px? [closed]
- anchor click doesn’t open the modal
- Issue with a design when content increase [closed]
- What is the easiest way to disable/enable buttons and links (jQuery + Bootstrap)
- Twitter Bootstrap Use collapse.js on table cells [Almost Done]
- Bootstrap throws Uncaught Error: Bootstrap’s JavaScript requires jQuery [closed]
- How to fade loop background images?
- Bootstrap CSS Active Navigation
- How to force a html5 form validation without submitting it via jQuery
- twitter bootstrap typeahead ajax example
- $(window).width() not the same as media query
- Play/pause HTML 5 video using JQuery
- How to automatically change the text size inside a div?
- jquery IE Fadein and Fadeout Opacity
- Store JSON object in data attribute in HTML jQuery
- Adding data attribute to DOM
- How can I show and hide elements based on selected option with jQuery?
- jQuery Scroll to Div
- How to stay on current window when the link opens in new tab?
- How can I display a tooltip on an HTML “option” tag?
- jQuery get the id/value of element after click function
- How to change active class while click to another link in bootstrap use jquery?
- Removing file from multiple files uploader on button click when using HTML5 file input
- CORS request – why are the cookies not sent?
- Bootstrap Dropdown with Hover
- What’s faster for including scripts, using CDN (Google) or storing them locally in website’s root?
- Disable select options based on value *through the HTML only!*
- Html5 drag and drop on svg element
- Load content with ajax in bootstrap modal
- Can jQuery selectors be used with DOM mutation observers?