I'm a toolbar. Classes on root element:

Examples

Functions

disableScroll() / enableScroll()

isTopInView(target)

target an offset or $element.

Takes the toolbar into account, so 'Page top' will always be false because of the toolbar.

scrollTo(target, whenInView)

target an offset or $element
whenInView default true

Auto initiated on specified DOM elements.

Scroll to top
Scroll to 'Functions' chapter, only if it's out of view
Scroll to 'Functions' chapter, even if it's already in view

scrollToHash()

Can be used in $(window).load event to scroll to a certain id on the page.

VH examples

data-viewport-vh attribute example for older browsers. Soon to be obsolete.

2/3 page height

Full page