Hello!
Initially images in a gallery of various sizes and orientations
I would like them to automatically turn over to the whole page, either in width or height, depending on the orientation of the image. Now I do this:
$('.fancybox').fancybox({ minHeight: $(window).height(), maxHeight: $(window).height(), fitToView: true }) But if the image has, for example, a 3: 1 ratio - horizontal scrolling appears, how can you avoid it?
And one more bug with this approach - when the browser window is resized, minHeight and maxHeight do not change.
Tried to use
$(window).resize(function () { $.fancybox.update(); }) Does not help:(