0.0.1 • Published 10 years ago
sticker v0.0.1
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 containerElementThe DOM element that contains elementnullstickyAboveViewportClassNameClass name to add to elementwhen it is “sticky” and above the viewportsticker--sticky-above-viewportstickyClassNameClass name to add to elementwhen it is “sticky” and within the viewportsticker--stickytopOffsetThe scroll offset at which the elementbecomes “sticky”0
Installation
Install via npm:
$ npm i --save stickerLicense
0.0.1
10 years ago