What is my question and here is my sample code.
HTML:
<a class="fancybox" rel="group" href="img1.jpg"> <img src="img1_thumb.jpg"> </a> <a class="fancybox" rel="group" href="img2.jpg"> <img src="img2_thumb.jpg"> </a>
JS:
var header = '<img id="w" src="logo.gif">'; $('.fancybox').fancybox({ afterLoad: function() { this.wrap.prepend(header); },
If you click on the thumbnail to launch FancyBox, afterLoad will fall into the header, but when you click on the image and look at the console, you wonβt get anything.
Thoughts? I am trying to use the FancyBox $.fancybox.close() method, but if I cannot fire the click event, I have to use it inline, which I would rather not do without using JS inline.
Brian whitton
source share