I have seen a similar question here : Fancybox chokes on a URL that contains "&" And I have tried all offered solutions but none of them work ! I have included correctly all links, ( the jquery link first ) I checked, and at the beginning of my document, I declared fancybox like this :
<script type="text/javascript">
$(document).ready(function() {
$(".fancybox").fancybox({'type' : 'image'});
openEffect : 'none',
closeEffect : 'none'
});
});
</script>
My code is :
echo '<a class="fancybox" rel="group1" href="square/'.$fic_serie .'">
<img src="square/'.$fic_serie .'" alt=""/></a>';
$fic_serie is the var that will get replaced by the image name
Right now, I feel like nothing works; the images are way too big compared to how I said they should be ( in the fancybox.js file ) and when I click on them, they open as a link, not in lightbox.
I have also tried
class='fancybox fancybox.image'
but without luck.... Thank you !
try this code
<script type="text/javascript">
$(document).ready(function() {
$(".fancybox").fancybox({
type : 'image',
openEffect : 'none',
closeEffect : 'none'
});
});
</script>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With