Lightbox a PFD with Easy Fancybox

Sometimes it would be nice to be able to display a PDF on your site with a lightbox effect.
Why would you want to do that? Let me give you a good example from how we do it on one of our real estate blogs.

When I create a listing post I like to include in the sidebar document links pertaining to the listing.

  1. SPDS
  2. HOA Info
  3. Well Agreement

It is nice to be able to display these in a list in the sidebar of the listing and lightbox these PDF documents.

Check this out Test PDF nice isn’t it.

There are several plugins that will do this, I’ve used Lightbox Plus and now Easy Fancybox.

Easy FancyBox Settings

The easy fancybox settings are located under the media settings Settings>Media>Scoll down.

Enable Fancybox For:
I leave these as they are currently set.

Links:  None None

Overlay: Check both boxes
Opacity: 0.5
Color: #000  (black)

You can make changes to other settings for personal preference.

Lightbox another site

If you want to lightbox another site you need to add a class to your link
To make a website or HTML document open in an overlay, use the class “fancybox-iframe” for its link. Adjust its specific settings below.

A Website

How’s that for looking at a mirror in a mirror in a mirror.

Lightbox your images

Of course it also provides the lightbox effect for all your images as well.
If you install the Nextgen Gallery Optimizer it uses fancybox.

Easy Fancybox is lightweight, loads quickly and provides a nice way to lightbox PDF files, Images, and even URLs.