I’m trying to create a SlideDown/SlideUp type menu based on certain conditions. Hopefully, someone can help me figure it out even if it is just part of it.
1. NAVBAR not fixed - completely transparent so that .full-background background/image is visible.
Having an issue with transparency when navbar-fixed-top isn’t appended. Not sure if it’s because of bootstrap. I’ve commented out navbar-fixed-top so you can see.
SlideUp/SlideDown Conditions
2. When a link is clicked to each link section – NAVBAR ‘SlidesDown’
3. When a user scrolls down – NAVBAR ‘SlidesUp’ (To hide it so all content is visable)
4. When a user stops scrolling – NAVBAR ‘SlidesDown’ (If they want to click another link)
So fix it to the top. That seems to be the desired behavior. Bind a scroll event to set it appearance to none, and variable a timeout to make it appear again. As long as the user continues to scroll, the function is called repeatedly and keeps the bar hidden, and then when they stop the timeout completes and the bar is revealed.
The example shown in the link above is in pure javascript, and works in any template. AFAIK, Bootstrap does not give an alternate means of binding an event. jQuery offers a few shorthand methods like .on() and .scroll() (which is itself a shorthand for .on(‘scroll’)