Stay on top navigation toolbar when scrolling down

This is a navigation toolbar that will stay on top when you scroll down. It’s done with jquery. The logic is simple, when the length of the scrolled window is bigger than the position of the toolbar position, then I add a fixed class to the toolbar. If not then I remove it.

This script was based from Twitter Bootstrap.

Enhanced by Zemanta
Ping your blog, website, or RSS feed for Free Sitetag