Categories

jQuery “FancyBox”

Template-help.com Team March 17, 2011
Rating: 4.3/5. From 4 votes.
Please wait...

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. 1 Initialization script we place in the <head> section. It initializes the link with the id #single_image 2 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: 3 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: 4
This entry was posted in Lightbox, Working with jQuery scripts and tagged fancybox, jQuery, lightbox. Bookmark the permalink.

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