Better Browsing with Lightbox

A Lightbox effect is a common name for an overlay that displays an image on top of a site, without opening a popup (see Figure 14-2). You need to close this to access the actual site again, which may sound like a bad idea, but compare it to having to open a new page to view the image in full size and you get the picture. Most decently designed Lightbox solutions have accessible browse buttons as well.

This is pulled off with JavaScript and some design trickery, and there are a ton of possible solutions waiting for you a mere Google search away. Which solution you choose all depends on how much visual bling you want, and what sorts of effects suit you and your site. I do think you should go with one that comes as a WordPress plugin though, because that means that you won't have to add any classes to your images manually to make sure the Lightbox solution recognizes the link as

RpCfcSJMj d*t nya svi'U

Sfiart i en It on sol nara dig

Figure 14-2: Lightbox effect in action a Lightbox one. The plugins do this manually, and suddenly your image gallery won't have to open those attachment pages at all, and your visitors can browse your photos with ease and flair.

However, there are drawbacks, the most obvious one being what happens if the visitor has turned off JavaScript, or if someone clicks the thumbnail link before the Lightbox script is fully loaded. The result is an opening of the image as a whole, outside of the design and everything, just as if the link pointed to the image itself only. Which it usually does, but then the script puts it right in the effects it adds. It isn't too pretty when that happens, especially if the visitor expects that nice overlay effect and the easy Previous/Next links it probably sports, but then again it is a fully functional solution as well, thanks to the Web browser's back button.

Why wouldn't you use a Lightbox solution? There aren't that many reasons actually, and the plugins available are easy enough to use on just about any theme. The issue with no JavaScript is diminishing predictably enough, but there's another problem here, and that is smaller devices. How good does something like this look on a seven-inch low-resolution screen? Is it really useful then? The same can, in all fairness's sake, be said about attachment pages, but it is a bit easier to style those on a peruser agent basis. You should make sure that the Lightbox script doesn't override any such solutions.

Finally, if you make your money on page views, don't go the Lightbox route unless you think it will bring in more readers. After all, having people load a new page, and hence a new set of ads, whenever they want to view the next image in a gallery can be good business in itself!

Was this article helpful?

0 0
7 Days to Profitable Blogging

7 Days to Profitable Blogging

Learn The Simple Blueprint To Successfully Starting a Profitable Blog In Just 7 Days? MOST blogs fail because their owners start out badly, and continue to make mistakes. By the time they realize what's gone wrong, they would be quicker restarting!

Get My Free Ebook

Post a comment