Skip to content

Latest commit

 

History

History
41 lines (26 loc) · 1.05 KB

File metadata and controls

41 lines (26 loc) · 1.05 KB

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.