There are a number of Lightbox applications out there based on jQuery, prototype and scriptaculous. But I wasn't able to find a similar product built on the YUI library, which in my opinion, is by far the best out there. So I started out creating a simple Lightbox. Right now there are gallery and standard modes plus an option to load photos from an external XML file. You can chose modal or not and there is a dragable option. This is just a BETA version, I am going to need help and time to get this compatible with all platforms/browsers.

See the demos here, here and here.
The current theme is "Default Theme", you can switch it by clicking here.

Releases

Known bugs



* Submit bugs by posting a comment to the article

Enhancements



* Submit enhancements by posting a comment to the article

Download

Download the ZIP file here. (v0.93 BETA)

Installation

Link the lightBox.css file, found in the assets directory. You will need 3 files from the YUI 2.3.1 library, they are found in the ZIP file. Be sure to add them first, into the head of you document. To run the examples on this site, simply extract the files to you web root.

<link rel="stylesheet" type="text/css" href="assets/css/lightBox.css" />
<script type="text/javascript" src="yui-2.3.1/build/yahoo-dom-event/yahoo-dom-event.js"></script>
<script type="text/javascript" src="yui-2.3.1/build/dragdrop/dragdrop-min.js"></script>
<script type="text/javascript" src="yui-2.3.1/build/animation/animation-min.js"></script>
<script type="text/javascript" src="yui-2.3.1/build/connection/connection-min.js"></script>
		
Then link the lightBox.config.js file, this is the file you can modify to change configuration.
<script type="text/javascript" src="assets/dom/lightBox.config.js"></script>
<script type="text/javascript" src="assets/dom/lightBox.js"></script>
		
Now for the mark up. All you images need to go into a DIV container with the class "lightBoxContainer". Place you images in this container and wrap them in an anchor tag. Make syre the href has a "void(0)" or "javascript:;". Check the documentation section for the mark-up properties and thier meanings.
<div class="lightBoxContainer">
	<a href="javascript:;">
		<img
			src="[Path to thumbnail]"
			longdesc="[Path to zoomed sized photo]"
			title="[Image title]"
			alt="[Image Description]"
			class="lightBox" />
	</a>
</div>