I'm trying now for hours to get the FancyBox Image Gallery working but the image file instead opens in the browser and not the FancyBox layer. I'm using another Fancybox element on the site and that's working perfectly. Can anyone help?
Header Code:
<link media="screen" href="jquery.fancybox.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="jquery-1.8.2.js">
<script type="text/javascript" src="jquery.hcsticky-min.js">
<script type="text/javascript" src="superfish.js">
<script type="text/javascript" src="jquery.flexslider-min.js">
<script src="jquery.fancybox.pack.js" type="text/javascript">
Only some things I tried:
$(document).ready(function() {
// Photo Gallery
$('a.photogallery').fancybox({
padding: 0,
overlayColor: '#000',
overlayOpacity: 0.45,
scrolling: 'no',
helpers : {
title : { type : 'inside' }
}
});
});
$(document).ready(function() {
// Photo Gallery
$('photogallery').fancybox({
padding: 0,
overlayColor: '#000',
overlayOpacity: 0.45,
scrolling: 'no',
helpers : {
title : { type : 'inside' }
}
});
});
$(document).ready(function() {
// Photo Gallery
$('a.photogallery').fancybox();
});
$(document).ready(function() {
// Photo Gallery
$('.photogallery').click(function() {
$('photogallery').fancybox({
padding: 0,
overlayColor: '#000',
overlayOpacity: 0.45,
scrolling: 'no',
helpers : {
title : { type : 'inside' }
}
});
}
});
HTML Gallery (I also tried class="fancybox photogallery" and different values for class and rel tag):
<div class="photos">
<a title="" href="/files/thumb/f66cf2bba997313/800/600" rel="photogallery" class="photogallery"><img alt="" src="/files/thumb/f66cf2bba997313/180/180/fit"></a>
<a title="" href="/files/thumb/36d8b240686ea33/800/600" rel="photogallery" class="photogallery"><img alt="" src="/files/thumb/36d8b240686ea33/180/180/fit"></a>
<a title="" href="/files/thumb/e0986f42bd03cf4/800/600" rel="photogallery" class="photogallery"><img alt="" src="/files/thumb/e0986f42bd03cf4/180/180/fit"></a>
<a title="" href="/files/thumb/1160ee763726480/800/600" rel="photogallery" class="photogallery"><img alt="" src="/files/thumb/1160ee763726480/180/180/fit"></a>
</div>
The other element works perfectly:
// Brochure Request Overlay
$('.brochure-request').fancybox({
padding: 0,
width: 800,
height: 400,
overlayColor: '#000',
overlayOpacity: 0.45,
scrolling: 'no'
});
<a class="brochure-request fancybox.iframe btn orange-btn" href="/en/brochures">Brochure</a>
Any ideas? Thanks in advance!
Philip