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

A tiny Lightbox work-alike in pure JavaScript


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

To use it with fotogirl, just drop pixpls.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 fotogirl 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.