another lightbox that is capable of
displaying images,
remote html files, flash animations and pdf files
Here it is, one of the first lightboxes that handles all the files you want to display without leaving the page.
Similar to the original Lightbox introduced by Lokesh Dakar, this lightbox / slimbox clone animates a box that drops in from above, showing your image, pdf file or even a remote document.
At the moment, this is the first initial release, its simply a function, not a class object. We will continue working on this project to fix any occuring errors and come up with a sleak and easy to implement ajax class.
Open a pdf on this server / this takes a while, just for testing purposes
Open a flash file on this server ( Firefox / Opera only at the moment )
To get this script going, download our script here. Extract the javascript files to your document folder ( in this sample we use the /js folder to locate the files ). This demo utilizes the mootools framework BETA 1.2 to enable the flash ( swiff ) feature.
Now add the following to the <HEAD> section of your document:
<script language="javascript" type="text/ecmascript" src="js/mootools.js"></script>
Now, insert bumpbox.js into your document, exactly before the closing </body> tag.
Like this:
<script language="javascript1.2" type="text/ecmascript" src="js/bumpbox.js"></script>
</body>
Add the bumpox.js to your document header ( link or import it ):
<link href="bumpbox.css" rel="stylesheet" type="text/css" />
Now remove any href tag from the link that should be shown as a bumpbox - and add the parameter rel="bumpbox" to it. Put the link into the "title" tag of the link. Sample:
<a href="javascript:void(0);" title="designlab_big.jpg" rel="bumpbox" rev="640 480">Open an image on this server</a>
Now specify the size of the window with the rev="xxx xxx" parameter in your link tag. You can omit that when opening images, but for flash, pdf's and websites you'll need to specify it.
All inclusive download ( mootools, bumpbox.js and bumpbox.css ):
Bumpbox only:
For troubleshooting, feature requests, and general help, send a message to admin[at]artviper.net. Make sure to include details on your browser, operating system, Bumpbox version, and a link (or relevant code).
If you're feeling generous, consider a donation. Any and all PayPal donations are sincerely appreciated. Thanks.