All Projects → 1000ch → position-sticky

1000ch / position-sticky

Licence: other
Polyfill for position: sticky;.

Programming Languages

HTML
75241 projects
javascript
184084 projects - #8 most used programming language

position-sticky

Polyfill for position: sticky;.

Usage

Load position-sticky.min.js.

<script src="dist/position-sticky.js"></script>

Create PositionSticky() instance and call attach().

var positionSticky = PositionSticky(document.querySelector('.sticky'));
positionSticky.attach();

If you want to stop, call detach() of instance.

positionSticky.detach();

To use as Web Components Extension, set is="position-sticky" to <div>.

<div is="position-sticky"></div>

License

MIT: http://1000ch.mit-license.org

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].