Adds CSS class to a HTML element depending on scroll position.
This module adds a format filter:
- Enable ScrollPos-Styler adding (
class="sps"
) to your elements. - Configure the scroll position in px to trigger the style adding (
data-sps-offset="80"
) to your elements. - "sps--abv" or "sps--blw" classes will be added when the window is scrolled above/below the defined position.
Form element example: