jScroll is a jQuery plugin that keeps an element in view when a user scrolls.
JavaScript