Home & blog  /  2011  /  Mar  /  view post  /

Update to lightbox and lightbox dialog

posted: 29 Mar '11 12:54 tags: Javascript, lightbox, dialog, jQuery

Of all my scripts, probably the one I've had the most use of is my lightbox and lightbox dialog library. More than a standard lightbox, it also provides dialog functionality so you can replicate native alerts and confirms but in a nice, styled lightboxy sort of way.

And it's just had an update, which now allows it to load absent files - that is, files not currently present in the DOM - as well as entire pages.

This is much better; it means you no longer have to load - but hide - full-size photos of thumbnails into your DOM. Now you can just point the lightbox script at it even though they're absent from the current DOM.

Pages open in an iframe loaded inside the lightbox (the size can be tweaked in the config).

For both techniques, run the lightbox plugin on a string pointing to the file to load, e.g.

1'folder/somePic.jpg'.lightbox(); //load absent picture

2'folder/somePage.php?someVar=3'.lightbox(); //load page

...and the script does the rest. Head over here to download, get usage info or view a demo.. Updated documentation to follow.

post new comment

Comments (0)