Featured templates

JS Animated. How to implement jQuery “prettyPhoto” lightbox plugin

Norman Fisher December 11, 2013
Rating: 4.0. From 5 votes.
Please wait...

This tutorial is going to show you how to implement the jQuery prettyPhoto lightbox plugin into your JS Animated template.

JS Animated. How to implement jQuery “prettyPhoto” lightbox plugin

PrettyPhoto is a jQuery lightbox clone. It supports not only images, but also videos, flash, YouTube, iframes and ajax. It’s a full blown media lightbox.

To add it to your page:
  1. Download from  on your computer and unpack it.

  2. Copy the js and css folders from the unzipped package and paste them into the site folder of your template package. Since you already have folders with the same names there, you will be asked to replace them. This will just add the files in these folders to them, so just go ahead and agree to the replacement.

  3. Open the .html file with the image you want to apply the plugin to and add the libraries and the table of styles to it in DreamWeaver to the <head> section:

    <link rel="stylesheet" href="css/prettyPhoto.css" type="text/css" media="screen" title="prettyPhoto main stylesheet" charset="utf-8" />
    <script src="js/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script> 
  4. Find the line with the image, e.g.:

  5. <img src="images/image_small.jpg " alt="" />

    And change it to:

    <a href="images/image_big.jpg" rel="prettyPhoto" title="Single Photo"><img src="images/image_small.jpg " alt=" " /></a>    

    In the images folder there should be image_big.jpg and image_small.jpg accordingly.

  6. Initialize prettyPhoto: add the following to your .html file right before the closing </head> tag:

    <script type="text/javascript" charset="utf-8">
  8. Save the changes and  check your page in a web browser: the image should be opening in a lightbox.
  9. js_animated_jquery_prettyphoto_lightbox_plugin_implementing_7.

For more information on how to use the plugin, please refer to the official manual at

Feel free to check the detailed video tutorial below:

JS Animated. How to implement jQuery “prettyPhoto” lightbox plugin

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket