Alright, I thought I implemented this correctly, but I guess I must\'ve goofed somewhere.
Here\'s my code:
Jquery here:
jQuery(document).read
This href="http://placehold.it/350x125"
doesn't say to fancybox that you are opening an image
so you either :
1). add the fancybox.image
special class to your link like
2). add the (HTML5) data-fancybox-type
attribute to your link like
3). add the type
option to your fancybox script like
$(".fancybox").fancybox({
type: "image"
});
whatever you think works better for your case.
NOTE: numbers 1). and 2). above work for fancybox v2.x only. Number 3). works for either v1.3.4 and v2.x
EDIT : included a JSFIDDLE with your code and jQuery v1.8.3.
There are two links :