FancyBox is a tool for displaying images, HTML content and multi-media in a Mac-style “lightbox” that floats overtop of web page.
JavaScript
We should include jQuery
framework, jquery.
fancybox-1.3.1.pack and jquery.
easing-1.3.pack by pointing src attribute in the
script tag to those .js files.
Initialization
script we place in the <head> section. It initializes the link with the id #single_image
There are plenty of additional settings, that you can check at the official
website http://
fancybox.net/
api
HTML
Below you can see general
HTML script representation:
The href attribute indicates path to big image, which will display in the preview window. If you need to arrange some number of images into one gallery, then add attribute rel with the same value (id) (e.g. rel=”group1″).
CSS
You can find
script related styles in the css file: