sticker
v0.0.1
Published
Effortless sticky DOM elements.
Maintainers
Readme
sticker

Effortless sticky DOM elements.
Example
$ git clone https://github.com/yuanqing/sticker
$ npm install
$ npm install --global gulp
$ gulp example --openAPI
import sticker from 'sticker';sticker(element [, options])
element— A DOM element.options— An optional object literal:Key | Description | Default :--|:--|:--
containerElement| The DOM element that containselement|nullstickyAboveViewportClassName| Class name to add toelementwhen it is “sticky” and above the viewport |sticker--sticky-above-viewportstickyClassName| Class name to add toelementwhen it is “sticky” and within the viewport |sticker--stickytopOffset| The scroll offset at which theelementbecomes “sticky” |0
Installation
Install via npm:
$ npm i --save sticker