views:

970

answers:

4

I'm looking for the world's simplest lightbox. All I want is an implementation that pops up a modal window in the center of the screen and requires a button or other element in the box be clicked before the box is hidden.

With so many lightbox implementations, I'm a bit overwhelmed. What's the simplest, dumbed-downest lightbox that does this right out of the box with minimal customization?

+4  A: 

The one I use is called Slimbox 2. http://www.digitalia.be/software/slimbox2

It isn't the simplest, but it is substantially lighter than the original Lightbox. It's super easy to use and if you use the minified Google-hosted version of jquery, then it's pretty fast to load too. That can be found at http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js

Steve Wortham
By the way, the other advantage of using the Google-hosted jquery is that it's gzip-compressed. If your web server is set up for gzip compression you could host it there and get the same benefit. Otherwise, I'd use Google's version.
Steve Wortham
Even if your server is set up to do compression, it is probably still better to use google, since your browser will most likely have google's version cached from some other site.
Paul Wicks
+2  A: 

There are probably as many answers as lightboxes out there but I was really happy with Fancy Box: http://fancybox.net/

It's got a great look and feel and the code is pretty minimal:

<div class="gallery">
    <a rel="group1" href="http://site/Images/1.jpg"&gt;&lt;img src="http://site/Thumbnails/1.jpg" alt="" border="0" height="47" width="100"></a>
    <a rel="group1" href="http://site/Images/2.jpg"&gt;&lt;img src="http://site/Thumbnails/2.jpg" alt="" border="0" height="49" width="100"></a>
</div>
<script type="text/javascript">
$(document).ready(function() { 
    $("div.gallery a").fancybox();
});
</script>
Mark L
A: 

impromptu, blockui - both lightweight

redsquare
A: 

Try ColorBox - "A light-weight, customizable lightbox plugin for jQuery 1.3".

Dan Diplo
problem with colorbox is its css, which doesn't always play nice when you try to load ajaxy contents.
mike
I don't really understand. You can change the CSS to whatever you want - the themes that come with it are just examples. I've used ColorBox with ajaxy contents many times and never had a problem.
Dan Diplo