in-view.js is a lightweight (~1.9kb gzipped), dependency-free, JavaScript utility to detect when a DOM element enters or exits the viewport. It is also available as npm package.

View Project Page   View on Github