whatisgithub

What is waypoints?

imakewebthings/waypoints — explained in plain English

Analysis updated 2026-06-24

10,320JavaScriptAudience · developerComplexity · 2/5LicenseSetup · easy

In one sentence

Waypoints is a tiny JavaScript library that runs a function when the user scrolls to a specific element, with built-in shortcuts for infinite scroll, sticky elements, and viewport enter/exit detection.

Mindmap

mindmap
  root((Waypoints))
    What it does
      Scroll trigger events
      Direction detection
      Viewport enter and exit
    Use Cases
      Animate on scroll
      Infinite scroll loading
      Sticky headers
    Tech Stack
      JavaScript
    Audience
      Front-end developers
      Web designers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Trigger a CSS animation when a section scrolls into the visible area of a landing page.

USE CASE 2

Load more content automatically when a user reaches the bottom of a list.

USE CASE 3

Make a navigation bar stick to the top of the screen after the user scrolls past the page header.

What is it built with?

JavaScript

How does it compare?

imakewebthings/waypointshackjutsu/leptonjquery-validation/jquery-validation
Stars10,32010,33110,332
LanguageJavaScriptJavaScriptJavaScript
Setup difficultyeasyeasyeasy
Complexity2/51/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min
Use freely in any project, personal or commercial, as long as you keep the copyright notice.

So what is it?

Waypoints is a small JavaScript library with one job: run a function when a user scrolls to a specific element on a page. For example, you could use it to trigger an animation when a section comes into view, load more content when the user reaches the bottom of a list, or make a navigation bar stick to the top of the screen once someone scrolls past the header. The core concept is simple. You point Waypoints at an HTML element and give it a handler function. When the browser's scroll position reaches that element, the handler fires. The handler also receives a direction value so you know whether the user scrolled down to reach the element or scrolled back up past it. Beyond the basic scroll-trigger behavior, the library includes three extension shortcuts for common patterns. Infinite scrolling loads additional content automatically when the user nears the bottom of a page. Sticky elements make a header, menu, or sidebar lock in place as you scroll past a certain point. Inview detection fires events when an element enters or leaves the visible area of the screen. The README is short and points to external documentation for full usage details. It notes that questions about how to use the library should go to Stack Overflow rather than the GitHub issue tracker, which is reserved for bug reports and code contributions. The project carries an MIT license and dates back to 2011.

Copy-paste prompts

Prompt 1
Using Waypoints, write the JavaScript to fade in a hero section when it enters the viewport on scroll.
Prompt 2
How do I use the Waypoints infinite scroll extension to automatically load the next page of blog posts?
Prompt 3
Show me how to use the Waypoints sticky extension to lock a sidebar in place after the user scrolls past the page header.
Prompt 4
How do I detect both when an element enters and when it leaves the visible area using Waypoints and fire different functions each time?

Frequently asked questions

What is waypoints?

Waypoints is a tiny JavaScript library that runs a function when the user scrolls to a specific element, with built-in shortcuts for infinite scroll, sticky elements, and viewport enter/exit detection.

What language is waypoints written in?

Mainly JavaScript. The stack also includes JavaScript.

What license does waypoints use?

Use freely in any project, personal or commercial, as long as you keep the copyright notice.

How hard is waypoints to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is waypoints for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.