InView.js

Simple, lightweight, and dependency-free JavaScript library for checking if an element is visible in the viewport.

Check out the GitHub repository for more information and documentation.

Example: