🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

StickyNav is a super tiny jQuery plugin makes your header navigation (or any elements) fixed on the top when scrolling down.

Sticky sticky-navigation

Documentation

StickyNav

A simple jQuery plugin for a sticky nav (or element)

Usage

/*css */ .sticky {     max-width: 1000px;     position: fixed;     width: 100%;     top: 0;     left: 0;     right: 0; } 
// js $("selector").StickyNav(options); 

Options

stickAt {int} default 1: Element will apply the "stick" class as soon as the window is scrolled to this position.

stickClass {string} default sticky: The css class to add to element when it is stuck.

onStick {function} default empty: Called when the nav sticks.

onUnStick {function} default empty: Called when the nav reverts.


You May Also Like