# waypoints

> Easily execute a function when you scroll to an element

Latest version **4.0.1** (published 2016-09-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install waypoints
pnpm add waypoints
yarn add waypoints
bun add waypoints
```

## Health

**Score 28/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score; popular repo.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.1 |
| Published | 2016-09-03 |
| First published | 2013-04-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/waypoints) |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10301 |
| Author | Caleb Troughton |
| Maintainers | anthonyshort, imakewebthings |
| Keywords | scroll |

## Links

- npm: https://www.npmjs.com/package/waypoints
- Repository: https://github.com/imakewebthings/waypoints
- Homepage: https://github.com/imakewebthings/waypoints#readme
- Issues: https://github.com/imakewebthings/waypoints/issues
- npm.io page: https://npm.io/package/waypoints

## Recent versions

- 4.0.1 (latest) — 2016-09-03
- 4.0.0 — 2015-08-20
- 3.1.1 — 2015-01-30
- 0.0.12 — 2013-04-14

## README

# Waypoints

Waypoints is a library that makes it easy to execute a function whenever you scroll to an element. ![Build Status](https://travis-ci.org/imakewebthings/waypoints.svg)

```js
var waypoint = new Waypoint({
  element: document.getElementById('thing'),
  handler: function(direction) {
    alert('You have scrolled to a thing')
  }
})
```

If you're new to Waypoints, check out the [Getting Started](http://imakewebthings.com/waypoints/guides/getting-started) guide.

[Read the full documentation](http://imakewebthings.com/waypoints/api/waypoint) for more details on usage and customization.

## Shortcuts

In addition to the normal Waypoints script, extensions exist to make common UI patterns just a little easier to implement:

- [Infinite Scrolling](http://imakewebthings.com/waypoints/shortcuts/infinite-scroll)
- [Sticky Elements](http://imakewebthings.com/waypoints/shortcuts/sticky-elements)
- [Inview Detection](http://imakewebthings.com/waypoints/shortcuts/inview)


## Contributing

If you want to report a Waypoints bug or contribute code to the library, please read the [Contributing Guidelines](https://github.com/imakewebthings/waypoints/blob/master/CONTRIBUTING.md). If you need help *using* Waypoints, please do not open an issue. Instead, ask the question on [Stack Overflow](http://stackoverflow.com) and tag it with <code>#jquery-waypoints</code>. Be sure to follow the guidelines for [asking a good question](http://stackoverflow.com/help/how-to-ask).

## License

Copyright (c) 2011-2014 Caleb Troughton. Licensed under the [MIT license](https://github.com/imakewebthings/waypoints/blob/master/licenses.txt).

---
_Source: https://npm.io/package/waypoints · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
