html - Shrink navbar while scrolling down using Bootstrap 3 -


I am using Bootstrap 3 for the development of a website. I need to create a navbar which should be as small as the user's scroll down.
Something like this -
How can I make it? I'm using a fixed-top example of bootstrap as the starting point -

I need to put a logo on the left instead of the text and reduce its size as the user scroll down. !
Thanks in advance.

A good example of scrolling is here:

  $ (Window) .scroll (function () {if ($ (document) .scrollTop ()> 50) {$ ('nav') AddClass ('shrink');} else {$ ('NAV'). Class ('shrink');}});    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -