- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
JS Animated. How to implement jQuery “FancyBox” lightbox plugin
January 21, 2014
This tutorial is going to show you how to implement the jQuery "FancyBox" lightbox plugin into your JS Animated template.
JS Animated. How to implement jQuery “FancyBox” lightbox pluginFancyBox 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 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 tag:
Save the changes and check your page in a web browser: the image should be opening in a lightbox.


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:
JS Animated. How to implement jQuery “FancyBox” lightbox plugin