The Heeere library was created to add a small scroll sniffing system to a page, providing developers with a hidden system that let's them code custom behavior in their apps based on the user's scrollbar position.
Heeere works by adding CSS classes (in real-time) to page elements.
If the element is above the user's viewport, the "past" class is added to it.
If it's below it, then the "future" class is added.
If the element is visible in the viewport, the "inside" class is used instead.
As the user scrolls the page, classes are updated as the elements come and go out of the viewport.
This allows the user to add custom CSS styles to page elements as they come into view, creating some pretty neat page loading or page transition effects.
An extra class can also be used with Heeere, the "seen" class, which can be added to all elements that have passed through the viewport.
Requirements:
- JavaScript enabled on client side
Comments not found