/sticky

Make element sticky depending on other elements

Primary LanguageJavaScriptMIT LicenseMIT

Sticky

Installation

npm install @wearejust/sticky --save

Usage

require('@wearejust/sticky');

$(function() {
    $('.sticky').sticky();
});

With options

require('@wearejust/sticky');

$(function() {
    $('.sticky').sticky({
        active: 'is-active',
        topHeightOffset: 0
    });
});