I want to slide the menubar according to the page scrolling. Here is an example : Sample Site
I want to do this menubar sliding effect.
I want to slide the menubar according to the page scrolling. Here is an example : Sample Site
I want to do this menubar sliding effect.
Have you taken a look at this suggestion:
http://ruturaj.net/automatic-header-stick-to-scroll-with-jquery/
It seems to do exactly what you are asking.
Conceptually, you would position the menu bar "static" until the coordinates of that div/ul reach the viewport. Then you would position it "fixed".
This answer should be of help with regard to getting the coordinates.How do I calculate the width between two elements?