Bootstrap 3 Hide Dropdown Menu on Menu Item Click

后端 未结 6 1083
眼角桃花
眼角桃花 2021-02-04 07:05

Check out the fiddle. I have a basic Bootstrap 3 responsive nav like so:

    
&
6条回答
  •  广开言路
    2021-02-04 07:55

    With Bootstrap 3.3.4 I realized my old way quit working. Updated it to:

    if ($('div.navbar-collapse').hasClass('in')) {
        $('button.navbar-toggle:visible').click();
    }
    

提交回复
热议问题