Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Home
How to use
How to use
1. First, make sure you are using valid DOCTY PE
FAQ
Support
Past Release
Version 1.3.4 (2010/11/11)
Changelog
Donate
2. Include necessary JS files
Our Sponsors
Optional - Add transitions as jQuery by default supports only "sw ing" and "linear"
Don`t forget to change background image paths if CSS file is not in the same directory.
Also, check src paths for AlphaImageLoader as they are relative to the HTML
document, w hile regular CSS background images are relative to the CSS document
(read more).
Images
Inline content
Iframe
Ajax
Optional - Use the title attribute for anchors if you w ant to show a caption
Note - You may w ant to set hideOnContentClick to false if you display iframed or inline
content and it containts clickable elements (for example - play buttons for movies, links
to other pages)
If you are not familiar w ith jQuery, please, read this tutorial for beginners
Sample examples:
$(document).ready(function() {
/* This is basic - uses default settings */
$("a#single_image").fancybox();
/* Using custom settings */
$("a#inline").fancybox({
'hideOnC ontentC lick': true
});
/* Apply fancybox to multiple items */
$("a.group").fancybox({
'transitionIn' : 'elastic',
'transitionOut' : 'elastic',
'speedIn' : 600,
'speedOut' : 200,
'overlayShow' : false
});
});
Note - ID's are meant for a SINGLE instance. If you w ant to use the same script for all
/* HTML */
<a class="grouped_elements" rel="group1" href="image_big_1.jpg"><img src="image_small_1.jpg" alt=""/></a>
<a class="grouped_elements" rel="group1" href="image_big_2.jpg"><img src="image_small_2.jpg" alt=""/></a>
<a class="grouped_elements" rel="group2" href="image_big_3.jpg"><img src="image_small_3.jpg" alt=""/></a>
<a class="grouped_elements" rel="group2" href="image_big_4.jpg"><img src="image_small_4.jpg" alt=""/></a>
/* This will create two galleries */
$("a.grouped_elements").fancybox();
/please, don`t send emails for help, use support forum instead