enabled option

Default

true

Possible Values

true or false.

Setting enabled to false is almost the same as calling disable after creation, with one key difference. When a waypoint is created, one of the steps in the process is to check if the waypoint has already been passed in the down direction. If it has, the waypoint handler is immediately triggered. However, if enabled: false is set in the options, even that initial check will not occur. Notice one of the following waypoints triggers on page load, and the other does not.

var waypoint = new Waypoint({
  element: document.getElementById('disabled-after'),
  handler: function() {
    notify('Disabled after creation')
  },
  offset: 99999 // big enough to be crossed already
})
waypoint.disable()

var waypoint = new Waypoint({
  element: document.getElementById('enabled-false'),
  handler: function() {
    notify('Enabled option false')
  },
  enabled: false,
  offset: 99999 // big enough to be crossed already
})