Skip to content

About

Lazy loading background images with IntersectionObserver

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

19 Commits

Folders and files

Repository files navigation

AfterParty

Images that are fashionably late.

ChatGPT Image Feb 6, 2026, 07_44_35 AM image

Install

npm install lazyloading

CommonJS (require)

const afterparty = require("lazyloading");

afterparty.autoInitialize();
// or afterparty.initialize({ selector: ".lazy-loading" });

ES Module (import)

import afterparty, { autoInitialize, initialize } from "lazyloading";

autoInitialize();
// or initialize({ selector: ".lazy-loading" });

Browser Demo

The local demo script (src/index.js) is now just a thin wrapper around the shared core module:

window.AfterParty.autoInitialize();

All package entrypoints (index.js, index.mjs, and src/index.js) resolve to the same implementation in src/afterparty-core.js, so updates happen in one place.

About

Lazy loading background images with IntersectionObserver

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages