On my site I open up a fancybox containing IFRAME content. Is it possible to update the size of the fancybox when a link is clicked within it?
For example, I have it
$('a', $('#youriframeID').contentDocument).bind('click', function() {
preventDefault();
$('#yourIframeID').attr('src', $(this).attr('href'));
$('#yourIframeID').load(function() {
$.fancybox.resize;
});
});
If an 'a' is clicked within your iframe, the default events will be blocked. Instead, we change the src of your iframe. When it's loaded, #.fancybox.resize will automatically resize the fancybox in respect to the content. This is an idea, so the code will probably not yet work. Just to help you get on the right track.