Skip to content

Instantly share code, notes, and snippets.

View slash1andy's full-sized avatar

Andrew Wikel slash1andy

View GitHub Profile

Smart Fixed Header

The gist? Slide the header up on scroll down, and slide it back into fixed position once the user scrolls back up. Super simple, yet super effective. Options include setting how many pixels from the top of the page to initialize (delay) and sensitivity (sensitivity).

Forked from Kyle Foster's Pen Smart Fixed Header.

A Pen by Secret Sam on CodePen.

License.