Home / Animation / Waypoints - Easiest way to trigger a function
Waypoints - Easiest way to trigger a function

Waypoints - Easiest way to trigger a function

Download Demo
  • Overview
  • Documents
User Rating: 4.9/5 ( 1 votes)
Your Rating:

Waypoints is the easiest way to trigger a function when you scroll to an element.

var waypoint = new Waypoint({
  element: document.getElementById('waypoint'),
  handler: function(direction) {
    console.log('Scrolled to waypoint!')
  }
})

Builds are available for multiple DOM libraries.

 

Shortcuts

In addition to the normal Waypoints script, extensions exist to make common UI patterns just a little easier to implement:

Source: github.com

Scroll To Top