View Full Version : LIGHTBOX 2 close action

04-29-2006, 05:53 PM
Hi Again!
What code do you use to get the close action on the full size image so the viewer can go back to the gallery? Lightbox 2: http://www.dynamicdrive.com/dynamicindex4/lightbox2/index.htm
Here are the 2 sample images I am using to learn this script: http://nwchristiancowboys.com/lite.html
Once I get that figured out then I will create my "real gallery" :D

04-29-2006, 07:20 PM
Har har har.

05-01-2006, 07:27 AM

This function is already run if one clicks on the close image image, clicks above or below the image box, or if one hits the x, c or o keys.

05-01-2006, 03:42 PM
Thank you, John
How about on the demo page:http://www.dynamicdrive.com/dynamicindex4/lightbox2/index.htm
when you open the daisy image, it has the word close and a X at the bottom right, how is this done?

05-01-2006, 07:52 PM
That's an image, configured in the lightbox.js file. Open that one up in a text editor and scroll down until you see:

// -----------------------------------------------------------------------------------

// Configuration
var fileLoadingImage = "images/loading.gif";
var fileBottomNavCloseImage = "images/closelabel.gif";

var resizeSpeed = 7; // controls the speed of the image resizing (1=slowest and 10=fastest)

var borderSize = 10; //if you adjust the padding in the CSS, you will need to update this variable

// -----------------------------------------------------------------------------------

That's where you can set the path to your loading and closing (red in the above) images, as well as those two other variables for speed and border.

If you want to use the one from the demo, you can copy it from here (right click on the image and choose 'save as'):


Here's the one for loading, if you want that one too.


BTW, these and other images used by the default version of the script are in the distribution archive Lightbox V2 (http://www.dynamicdrive.com/dynamicindex4/lightbox2/lightbox2.02.zip), as mentioned and available on the demo page.