Karl Hans Janke Kollaborativ
Heute die Welt, morgen das Sonnensystem!
<< prev next >>

A tiny Lightbox work-alike in pure JavaScript

pixls.klein.png

A little companion to fotogal has already silently made it into the repo: pixls displays images in a floating <div> atop the page with navigation buttons and metadata.

To use it with fotogal, just drop pixls.js next to the generated index.html. Everything else is already in place.

This one differs from the millions of other Lightbox clones in that it was invented here (har!), has no dependency on jQuery or another library and truly consists of only one file. No gifs, no css, just the JavaScript. Size is 8.5 kilobytes, 2.6 compressed.

Check the fotogal example for a demo. Basic usage instructions are in the source.

On the topic of compatibility: I have not tried it on Chrome, Opera or Safari. If you have, let me know. Alas, I will not be bothered with IE compatibility. That is all.

Update: (2020) The script was originally named pixpls in reference to harmless uses of that bit of Internet jargon. Considering the potential connotations, though, I want to avoid any ambiguity and rename it.