horizontal option
Default
false
Possible Values
true
or false
.
By default, everything in Waypoints land is happening on the vertical axis. Offsets are calculated with regard to the top of the element versus the top of its context, handlers are triggered in response to vertical scrolls, and the direction
parameter passed to that handler is either 'down'
or 'up'
.
When horizontal is set to true, all of this changes to the horizontal axis. Offsets are calculated between the left of the element and the left of the context, and the direction is either set to 'right'
or 'left'
.
Let's look at the simplest example. Here we'll use a custom context, just to make it easier on this site's design:
Vertical waypoints have a special possible offset shortcut value, 'bottom-in-view'
. Horizontal waypoints have an analog, 'right-in-view'
.