Reputation: 99
I just updated to Fancybox 2 and have been upgrading my previous custom calls.
Previously, I had a few vimeo videos showing in an iFrame. The video had previosly scaled to the width and height I had set below which was great
// Vimeo popups from the homepage etc
// Fetches a static html page where the iframe is embedded
$('a.vimeo-pop').fancybox({
'width' : 707,
'height' : 384,
'autoScale' : false,
'transitionIn' : 'none',
'overlayColor' : '#000',
'overlayOpacity' : 0.9,
'transitionOut' : 'none',
'allowfullscreen' : 'true'
});
Now that I'm using V2, I've had to tweak a few things and the video no longer scales to the width and height I am setting. I see scrollbars etc etc
Below is my newer call
// NEW FANCYBOX V2
// Vimeo popups from the homepage etc
// Fetches a static html page where the iframe is embedded
$("a.vimeo-popV2").fancybox({
'width' : 707,
'height' : 384,
'autoScale' : false,
'transitionIn' : 'none',
'overlayColor' : '#000',
'overlayOpacity' : 0.9,
'transitionOut' : 'none',
'type' : 'iframe',
'autoSize' : false,
'allowfullscreen' : 'true'
});
Any ideas? Thanks
Upvotes: 0
Views: 1545
Reputation: 41143
Fancybox v2.x options ARE NOT compatible with fancybox v1.3.x options. You would need to get rid of the old options and leave just the valid options for v2.x.
Now, the v.2.x fancybox option you would need to set (apart from width, height and type=iframe) in order to match the size you want to is
fitToView: false
Upvotes: 1