I have two problems related to image presentation in FancyBox2:
- Images are automatically applied zoom to. Ideally this should only happen when the user clicks on an image.
- The box holding the image does not fit.
The zooming problem is only present in IE and Chrome (not in Opera and Firefox), while the other problem is present in all browsers. This image illustrates the problems in chrome.
I have tried various configuration parameters in FancyBox, without luck. Right now I simply use:
$(".fancybox").fancybox({'type' : 'iframe'});
Any clues to why this happens?
You should use
type: 'image'for images.Iframetype is for external html pages.Images are displayed either re-sized to fit into the viewport (when
fitToViewis set totrue) or in their original size (whenfitToViewis set tofalse). If the image is bigger than the view port, then you have to scroll down the parent page to view the whole image.You may use the
buttonshelper to toggle an image from its scaled size to its real size too.