Lightbox is small javascript library used to overlay images on top of the current page. It's a snap to setup and works on all modern browsers.
Lightbox2 is open-source.
View and fork the code on Github.
<script src="js/jquery-1.7.2.min.js"></script>
<script src="js/lightbox.js"></script>
<link href="css/lightbox.css" rel="stylesheet" />
prev.png
and next.png
files are in the right location. Also, make sure the loading.gif
and close.png
files as referenced near the top of the lightbox.js
file are in the right location.rel="lightbox"
attribute to any link tag to activate Lightbox.
<a href="img/image-1.jpg" rel="lightbox" title="my caption">image #1</a>
Optional: Use the title
attribute if you want to show a caption. <a href="img/image-1.jpg" rel="lightbox[roadtrip]">image #1</a>
<a href="img/image-2.jpg" rel="lightbox[roadtrip]">image #2</a>
<a href="img/image-3.jpg" rel="lightbox[roadtrip]">image #3</a>
No limits to the number of image sets per page or how many images are allowed in each set. Go nuts!For personal support issues and feature requests please post a message in the forums. I do not have time to personally respond to support emails, please use the forum. Thanks!
For bug reports, send a note with the browser you are using and the version of Lightbox to lokesh.dhakar@[ google's email service ].com.
Lightbox is completely free to use. If you're using Lightbox on a commercial project and feeling generous, consider a small donation. Thanks!