The Best Javascript Lightbox

I spent a day or two trying various javascript lightboxes and trying to find a decent one for a commercial website. This post started as a big endorsement for Lightview however I’ve ended up looking at a few of the most popular and highlighting my favourite.

LightView by Nick Stakenburg

The first decent lightbox I stumbled upon was Lightview by Nick Stakenburg. You need to purchase a license to use it, but it’s pretty cheap—considering how long it would take to write this myself—and it looks great. I’ve utilised it for displaying both images and youtube videos for a client that wants something slightly different to the crowd.

Example usage…

<a class="lightview" title="" rel="flash" href="http://www.youtube.com/video_id">
<img class="screenshot_thumb" src="images/thumb.jpg"/>
</a>

It’s failing grace however is that it requires prototype and scriptaculous. With JQuery dominating, many people will be put off using this due to the additional overhead. If this doesn’t bother you and you are looking for an extremely flexible lightbox then you can’t go far wrong with this! Check it out via the link below.

The Lightview Website

FancyBox

Now definitely my preferred lightbox and once famously touted by the much over analysed 37 Signals websites. Fancybox is just sleek, it’s perhaps not as flexible as Lightview but then it’s free. It utilises JQuery which is currently my Javascript framework of choice and it’s also very well supported. Everytime I have visited the site in the past there has been a recent update based on the support forums and feedback.

Did I mention it looks great? The box shadow and modern black close icon, the subtle grey default background overlay, I love it.

Check out fancy box at http://fancybox.net

Lightbox 2

Long in the tooth, for a long time this was regarded as the best and only choice for a lightbox. Now it seems sluggish, looks dated and sadly still seems to be used by many sites and blogs. I’ve done it myself but come on everyone, it’s time to move on! Like Lightview, Lightbox 2 requires Prototype and Scriptaculous. A near identical JQuery version is available at http://leandrovieira.com/projects/jquery/lightbox/.

You can download Lightbox 2 at http://www.lokeshdhakar.com/projects/lightbox2/

Finally

There are a few other lightboxes kicking about but from my experience these are the three most popular and widely imitated lightboxes around. For a comprehensive list and feature comparison take a peek at this chart http://planetozh.com/projects/lightbox-clones/

2 replies
  1. Carps
    Carps says:

    That looks pretty slick – quite a bit faster than that-other-script-that-everyone-uses-whose-name-I’ve-forgotten. I might actually be using something like this on an upcoming (personal) project, so cheers for the heads-up :)

    Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *