Home > Scroll > Stickybits – Lightweight Alternative to position:sticky Polyfills
Stickybits – Lightweight Alternative to position:sticky Polyfills

Stickybits – Lightweight Alternative to position:sticky Polyfills

Stickybits is a lightweight alternative to position: sticky polyfills that works perfectly for things like sticky headers.

Features:

  • it can add a CSS Sticky Class (.js-is-sticky) when position: sticky elements become active and a CSS Stuck Class (.js-is-stuck) when they become stuck.
  • it loosely mimics position: sticky to consistently stick elements vertically across multiple platforms
  • does not have the jumpiness that plugins that are built around position: fixed have because it tries to support position: sticky first.
  • in its simplest use case, a scroll event listener will not be used if position: sticky is supported.
  • it is super simple & lightweight
  Website Demo

About admin