A simple, unobtrusive lightbox engine written in Javascript without any additional libraries, css or images required.

kzimmermann 9d3e26a61b Migrated from Google Code 9 yıl önce
LICENSE 76fb0216ed Init commit 9 yıl önce
README.md 9d3e26a61b Migrated from Google Code 9 yıl önce
example.html 9d3e26a61b Migrated from Google Code 9 yıl önce
simplelightbox.js 9d3e26a61b Migrated from Google Code 9 yıl önce

README.md

Highlighting pictures just got easier

simplelightbox is a simple unobtrusive lightbox engine written in javascript without any additional libraries, css or images required.

http://dl.dropboxusercontent.com/u/19410754/javascript/promo.png

The goal of this project is to create a powerful way to highlight and display images on a webpage without having to resort to bloated javascript libraries or complex setup methods - everything simplelightbox needs is a browser with javascript and a few images to work!

How to use it

To use simplelightbox, add it in a <script> element, such as <script src="simplelightbox.js"></script>, and initialize it with the command slbInitialize(). simplelightbox will automatically find all images in the page and add functionality to them. To trigger simplelightbox, simply click an image.

If you do not wish to apply the simplelightbox functionality to every image in your page, add the slbPhoto class to the desired images. simplelightbox will then only make the images tagged with this class functional.

If you would like to add a legend to a picture, include it in your markup as the alt attribute. This is not only a recommendation from the W3C, but also aids accessibility and helps your site's SEO ;)

Example

Here's an [http://dl.dropboxusercontent.com/u/19410754/javascript/example.html example page] using simplelightbox to enhance viewing in a light, unobtrusive way.

Enjoy!