I'm using Bootstrap 3 for a one page site that I am building. I've got a few issues thatI can't seem to overcome.
Scrollspy:
The first issue is regarding Scrollspy. I have implemented this but I'm wanting to unbind the scrollspy when scrolling up past the top most anchor. There are currently three items in the nav, the top most one being "work". When scrolling up beyond this area on the site I would like to unbind the "spying". I came up with an idea of adding an additional item into the nav (with an equivalent anchor) and then positioning it off the page, but this feels a bit dirty!
Collapsed menu on Mobile:
The other two issues I have are to do with the collapsed menu on mobile devices (tested on an iPhone 4).
The first is simply, when the nav is opened, then the the menu toggle is hit (to close it again) the collapsed menu does a strange flash, it doesn't just animate back out (as it does on web).
The second issue is that I would like the nav to disappear when one of the menu items is hit. I'm currently using the following code but it seems to cause some crazy scrolling of the page (again on a mobile device):
$('.nav li a').on('click',function(){
$('.navbar-collapse').collapse('toggle');
})
Any help is greatly appreciated!
to get rid of the flashing when the nav is openend you may want to try the following: