I have been doing a lot of work in jQuery as of late and stumbled across the popular jQuery plugin called "Thickbox" which works similarly to Lightbox, but is more fully featured.
ThickBox is a webpage UI dialog widget written in JavaScript on top of the jQuery library. Its function is to show a single image, multiple images, inline content, iframed content, or content served through AJAX in a hybrid modal.
There were a couple of problems with the plugin though when I started using it. For one, the plugin has not been updated in a long time and was not compatible with the latest version of jQuery: 1.3.1. It also used a rather non-standard way of configuration and was completely non-extensible. In fact, it required users to edit CSS and Javascript files in order to point the library at the right images to use. That's no good at all because it makes it possible for a simple upgrade to break a site, granted in a minor way, but still.
No doubt the original author of the plugin has a million other things on his plate, so I thought I would chip in, upgrade the plugin, and contribute them back to the author and community, and if necessary take over maintenance of the plugin.
Download
Documentation
Installation Instructions
Upload the thickbox files to your web server.
In your web page using thickbox, import the javascript like so:
<script type="text/javascript" src="jquery.thickbox-byrne.js"></script>In your web page, import the CSS like so:
<link rel="stylesheet" href="thickbox.css" type="text/css" />Read the rest of this documentation and initialize thickbox according to your needs.
Options/Settings
The following options can be used when initializing Thickbox.
macFFBgHack- default: '../images/macFFBgHack.png'. A path to the image "macFFBgHack.png" on your web server.loadingImage- default: '../images/thickbox-loading.gif'. A path to the image "thickbox-loading.gif" on your web server.modal- boolean (true|false), default: false. Determines whether or not the dialog that appears is modal or not.iframe- boolean (true|false), default: false. Determines whether or not the dialog will be iframed content.inlineId- string, default: ''. Sets the DOM id that contains the content that will be displayed in the thickbox.width- default: 600. Sets the size (width obviously) of the thickbox.height- default: 400. Sets the size (height obviously) of the thickbox.
Usage
$('a.thickbox').thickbox({
macFFBgHack: 'images/macFFBgHack.png',
loadingImage: 'images/thickbox-loading.gif'
});
Demo
Changes between 1.3 and 1.3-byrne
The version described here is '1.3-byrne' which is a fork of the original Thickbox plugin versioned 1.3. Here is a list of the changes I have made in my fork:
- thickboxes can be instantiated on any element ID now. It is no longer hard-coded to
$("a.thickbox"). - thickboxes are now configured using a more standard settings/options array.
- The plugin itself now utilizes more a more up-to-date coding standard for jQuery plugins.
- The plugin is now compatible with jQuery 1.3 and greater.






Making slight course corrections in Pandora