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.

ScrollDir is perfect for:

– 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.

Demo    ScrollDir

DMCA.com Protection Status