Lightbox 2 auto-resizing enhancement

written by seb on November 22nd, 2006 @ 10:05 AM

UPDATE: Michael Bagnall from ElusiveMind as just released the same patch for a newer version

Using Lightbox 2 since a will now, I was sticked with a feature missing for my needs.

I was looking for a auto-resizing option that may adjust my zoomed image to the window size (if the window is smaller than the image of course).

So I took my sleeves up and get my hand in it.

Check this out ;-)

Start by picking up Lightbox 2 with auto-resize and to use it the same way as Lightbox 2 .

The usage stay the same.

Only things that may need to be change are the two new configuration variables:

var featBrowser = true; // set it to true or false to choose to auto-adjust the maximum size to the browser
var breathingSize = 10; // control the minimum space around the image box

Have fun.

Comments are closed