Skip to content

Latest commit

 

History

History
29 lines (24 loc) · 635 Bytes

README.md

File metadata and controls

29 lines (24 loc) · 635 Bytes

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.