Home & blog  /  Tag: dialog  /

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 a comment

Lightbox and lightbox dialog

posted: 25 May '10 18:03 tags: Javascript, lightbox, dialog, jQuery

Just posted this. It's a standard lightbox, which runs on a jQuery selector, but more interestingly it's also a lightbox-assisted simulator for in-built browser dialog methods. You have full control over how your dialogs look and act. Here's a demo for a confirm():

1lbdialog({

2     content: "Go to Google?",

3     OKButton: {

4         text: "Yeah, OK",

5         callback: function() {

6             location.href = "http://www.google.co.uk"

7         }

8     },

9     cancelButton: {

10         text: "No, not now"

11     }

12});

Head over here to download, get usage info or view a demo.

post a comment