I am trying to display a Fancybox gallery with data that gets loaded via JSON. I was able to get the Fancybox to load properly after I load in and append the new HTML. However, when I attached rel="somegroup" the gallery functionality doesn't work and I cannot iterate through the group of images from the Fancybox.
Here's my fancybox call:
$('.fancyness').live('click', function(){
$.fancybox(this, {
'width' : 'auto',
'height' : 'auto',
'titleShow' : true,
'titlePosition' : 'over'
});
return false;
});
And here is what the images look like:
html += '<li><a class="fancyness" rel="group" href="' + full + '" title="'+ title +'">';
html += '<img title="' + item.title + '" src="' + thumbnail + '" alt="' + item.title + '" /></a></li>';
If I don't use .live the gallery (rel) function will work correctly but not on this data because this is being loaded in with JSON.
Does anyone have any ideas? I haven't had much luck finding anyone else with a similar issue.
Thank you.