Set menu with bootstrap after scrolling down

0

I'm using bootstrap in my code

You have a class in% of the bootstrap setting nav on top

  

navbar-fixed-top

But I want nav to only be fixed when the scroll passes through it.

How do I do this?

An example: This site

    
asked by anonymous 06.07.2017 / 10:17

2 answers

2

I think there is a plugin able to do this already in bootstrap, affix, does not need any javascript as far as I know.

link

The side menu is an example of using affix

    
06.07.2017 / 10:24
1

I found a snippet in Bootsnipp Navbar Affix

    
06.07.2017 / 11:01