Simple and easy to use jQuery plugin to observe document scroll. It executes two callbacks: first when document reach defined offset and second when document scrolled back.
Basic usage
Based on offset of the element in DOM. (See demo).
Loading code snippet...
Static offset
Based on pre-defined static offset. (See demo).
Loading code snippet...
Dynamic offset
Use function to calculate offset. (See demo).
Loading code snippet...
Handle instance
Attach to variable,
Loading code snippet...
Check state:
Loading code snippet...
Run callbacks manually:
Loading code snippet...
By default manual execution of callbacks does not change state. Pass Bool value in order to change instance state:
Loading code snippet...
Options
offset - set value when callbacks shoud be executed.

gap - gap between defined offset and current document offset.

once - callbacks will be executed once.

customEvents - adds events which scrollTrigger should react (By default: ready, touchmove, scroll).