handler option
Default
A no-op function, function() {}
.
Possible Values
Any function.
The handler option is the whole point of Waypoints. This is the function that executes when a waypoint is crossed. This function is passed one parameter, direction
. If you are scrolling down and cross the waypoint, direction
will equal 'down'
. If you are scrolling up, it will equal 'up'
.
Scroll down to view examples.
If you're using a horizontal waypoint, the direction parameter is set to either 'right'
or 'left'
.
Horizontal