Stikcybits
stickybits
Alternative to position: sticky polyfills.
Aprox
~2KB
of javascript that would help us to know when a DOM element is stuck (position:sticky).It can add a CSS Sticky Class
.js-is-sticky
whenposition: sticky
elements become active and a CSS Stuck Class.js-is-stuck
when they become stuck.Loosely mimics
position: sticky
to consistently stick elements vertically across multiple platforms.
Get it: npm install stickybits
Sample usage:
1 2 3 4 5 6 7 8 9 10 11 12 |
|
GIF FTW!