![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
stickybits
Advanced tools
Readme
Make things get sticky …in a good way
Stickybits is a lightweight (<2KB) alternative to
position: sticky
polyfills that works perfectly for things like sticky headers.
Stickybits is awesome because:
position: fixed
have because it tries to support position: fixed
first.Installation Setup Usage Options Examples Notes
yarn
yarn add stickybits
npm
npm install stickybits --save
bower
bower install stickybits --save
Add dist/stickybits.min.js.
stickybits('selector');
3 CSS classes will be added or removed by stickybits unrelated to the basic usage.
js-is-sticky
if the selected element is sticky.js-is-stuck
if the selected element is stopped at the bottom of its parent.js-stickybit-parent
so that styles can easily be added to the parent of a StickbitBy default, a StickyBit element will stick to the top of the viewport when vertically scrolled to.
To have a StickyBit not have the inline css property top
style:
stickybits('selector', {customVerticalPosition: true});
By default, a StickyBit element will have a 0px
sticky layout offset. This means that if the element will sticky to the top of the viewport by default.
To have a stickyBit stick with a 20px
offset to its vertical layout position:
stickybits('selector', {stickyBitStickyOffset: 20});
stickybits('selector', {stickyBitStickyOffset: 20})
stickybits('selector', {customVerticalPosition: true})
$('selector').stickybits();
We strayed away from calling Stickybits a Shim or Polyfill for position: sticky
because full support would require more code. This plugin simply makes elements vertically sticky very similarly to position: sticky
. Read more about position sticky here or follow its browser implementation here.
This plugin was heavily influenced by Filament Group's awesome Fixed-sticky jQuery plugin.
FAQs
Stickybits is a lightweight alternative to `position: sticky` polyfills
The npm package stickybits receives a total of 40,225 weekly downloads. As such, stickybits popularity was classified as popular.
We found that stickybits demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.