The scroll monitor allows you to receive events when elements enter or exit the viewport. It does this using watcher objects, which watch an element and trigger events. Watcher objects also contain information about the element they watch, including the element’s visibility and location relative to the viewport.
The code is based on vanilla javascript and has no external dependencies. Except if you want to put it in the head of the document, then you’ll need jQuery for the DOMContentLoaded event.
Demos:
- Stress Test – Test with as many watchers as you’d like
- Fixed Positioning and Locking
- Anchored section headers
- Complex sidebar behavior
The post scrollMonitor : jQuery Plugin to Monitor scrolling Elements appeared first on jQuery Rain.
by Admin via jQuery Rain
No comments:
Post a Comment