Does anyone know how to resize the jQuery Fancybox during runtime?
When initializing the fancybox I can do this:
$(\"tag\").fancybox({ \'frameWidth\
My solution was like that (for fancybox 1.3.4):
find
$.fancybox.resize = function() {
if (overlay.is(':visible')) {
overlay.css('height', $(document).height());
}
$.fancybox.center(true);
};
and replace with
$.fancybox.resize = function() {
if (overlay.is(':visible')) {
overlay.css('height', $(document).height());
}
view = _get_viewport();
var updated_width = view[0];
if (updated_width > selectedOpts.width) { updated_width = selectedOpts.width; }
$("#fancybox-wrap, #fancybox-content").css("width", updated_width);
$.fancybox.center(true);
};