https://github.com/bubkoo/position-sticky-polyfill
position: sticky; The shim/polyfill!
https://github.com/bubkoo/position-sticky-polyfill
Last synced: 3 days ago
JSON representation
position: sticky; The shim/polyfill!
- Host: GitHub
- URL: https://github.com/bubkoo/position-sticky-polyfill
- Owner: bubkoo
- License: mit
- Created: 2014-04-25T11:41:33.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2015-01-28T03:43:28.000Z (over 11 years ago)
- Last Synced: 2025-09-25T16:44:32.737Z (9 months ago)
- Language: JavaScript
- Size: 406 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
position-sticky-polyfill
========================
- © bubkoo@163.com
- MIT License.
### Usage
Include the polyfill:
```javascript
```
Next, initialize your sticky nodes:
```javascript
// sticky top
sticky('#my-element', { top: 10 }, callback);
// or
sticky('#my-element', 10, callback);
// sticky bottom
sticky('#my-element',{ bottom: 10 },callback);
```
Note: callback is optional.
### Browser Support
- IE6+
- Firefox
- Chrome
- Safari
- Opera