adamhenson / lighterbox
Installs: 31
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 22
Language:JavaScript
This package is auto-updated.
Last update: 2024-12-07 02:35:40 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
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.