adamhenson/lighterbox

There is no license information available for the latest version (1.0.0) of this package.

Installs: 31

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 22

Language:JavaScript

1.0.0 2016-09-26 13:18 UTC

This package is auto-updated.

Last update: 2024-11-07 02:19:32 UTC


README

#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.