ScrollDir : Leverage Vertical Scroll Direction with CSS

    ScrollDir : Leverage Vertical Scroll Direction with CSS

    ScrollDir, short for Scroll Direction, is a 0 dependency, ~1kb micro Javascript plugin to easily leverage vertical scroll direction in CSS via a data attribute.

    Features:

    • showing or hiding sticky elements based on scroll direction
    • only changing its direction attribute when scrolled a significant amount
    • ignoring small scroll movements that cause unwanted jitters
    Tags:

    Leave a Reply