This tutorial is going to show you how to implement the jQuery "FancyBox" lightbox plugin into your JS Animated template.
FancyBox is a tool for displaying images, html content and multi-media in a Mac-style "lightbox" that floats over a web page and is built using the jQuery library.
To add it to your page:
Download the plugin library from http://fancybox.net/ on your computer and unpack it.
Copy the fancybox folder from the unzipped package and paste it into the site folder of your template package.
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> tag:
Find the line with the image, e.g.
And change it to
In the images folder, there should be image_big.jpg and image_small.jpg accordingly.
Initialize the gallery: add the following to your .html file right before the closing </head> tag:
Save the changes and check your page in a web browser: the image should be opening in a lightbox.
<img src="images/image_small.jpg" alt="" />
<a class="fancybox" href="images/image_big.jpg"><img src="images/image_small.jpg" alt=""/></a>
Using the table of available options from http://fancybox.net/api, you can pass them as key/value object to the fancybox() function.
For more information on how to use the plugin, please refer to the official manual at http://fancybox.net/howto.
Feel free to check the detailed video tutorial below: