collapsed navbar remains expanded on a Twitter Bootstrap website

强颜欢笑 提交于 2019-12-11 02:56:49

问题


I have a problem with this website

http://www.Ghitulescu.de/beta/index.html

on an iPhone or at small browser windows: the navbar collapse as expected at smaller screen-widths, expands then when clicked on the navbar-toggle BUT when I am choosing one of the navbar-menu-items, the navbar remains like this (and covers more than the half of the iPhone-screen) until I click on the navbar-toggle again.

Could you please give me a hint?

Thank you!

Kind regards, Vlad


回答1:


That's how Bootstrap is designed.

If you would like it do that, add the following code to your site (Tested on Win7 Chrome 32):

$('ul.navbar-nav').on('click', function() {
  $('.navbar-collapse').collapse('hide');
});


来源:https://stackoverflow.com/questions/21653967/collapsed-navbar-remains-expanded-on-a-twitter-bootstrap-website

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!