A lighterweight gallery module for modern desktop and mobile browsers.
JavaScript
Latest commit 7db2a3a Jun 23, 2016 @adamhenson Fix link on new server.

README.md

lighterbox

A lighterweight lightbox gallery module. A simple plugin supporting modern mobile and desktop browsers to minimize configuration and hacky code. Customizable.

Example

See an example here.

Usage

Download lighterbox and reference it after jQuery.

<script src="/js/libs/jquery/jquery.lighterbox.js"></script>

Or load via synchronous or asynchronous module definition.

All basic styling is set in the JS, however it would be easy to override using the class selectors.

HTML

<a href="https://s3.amazonaws.com/hensonism-art/paul-gauguin/gaugin3.jpg" class="lighterbox">
    <img src="https://s3.amazonaws.com/hensonism-art/paul-gauguin/thumbs/gaugin3.jpg" />
    <h2 class="lighterbox-title">Painting by Paul Gaugin</h2>
    <span class="lighterbox-desc">Oil on Canvas</span>
</a>

JavaScript

$(".lighterbox").lighterbox({ overlayColor : "white" });

Options

  • overlayColor : {string} "white" or "black" options set the theme. Default is white.
  • overlayOpacity : {string or integer} Any valid css value.
  • animateSpeed : {string or integer} Any valid css value.