I\'m trying to use title and \"captions\" from image alt tags with fancybox 2... for some reason I can\'t seem this to work...
$(\'.fancybox\').fancybo
If I understood right, you want fancybox title as a combination of the title attribute in the a tag + the alt attribute in the img tag.
If the above is correct, then having a html like
the fancybox title should say "title anchor 01 alt image 01"
you do that with this script:
$(document).ready(function() {
$(".fancybox").fancybox({
helpers : {
title: { type: 'inside'}
},
afterLoad: function(){
this.title = this.title + ' ' + $(this.element).find('img').attr('alt');
}
}); // fancybox
}); // ready