to work ok. I thought I'd update this post incase someone else is looking for a similar solution but also maybe someone can shed some light on why this works as it looks quite similar to how I normally setup Fancybox. While I don't fully understand it, the issue seemed to be based around
.
So as I normally load my Fancybox like this: `$(".fancybox").fancybox({ FB OPTIONS HERE });`
It was recommended I change the call to this, which seems to work...
var fbOpts = {
margin: [20,40,20,40],
padding: [20,20,0,20],
openEffect: 'fade',
//openEasing: 'easeInQuad',
openSpeed: 400,
title: false,
scrolling : 'no', // turns off scrolling in box.
fitToView : false, // allows box to overflow out of viewport.
autoSize: false, // needs to be turned on for width/maxWidth to work.
height: 'auto', // if autoSize is set to 'false', this needs to be 'auto' so height matches content.
width: '100%',
minHeight: 0,
maxWidth: 900,
helpers: {
overlay: {
showEarly : false
}
}
};
$(document).ready(function() {
$('.fancybox').on('click', function() {
$.fancybox.open($.extend({}, fbOpts, {href : $(this).attr('href')}));
});
});
As far as I can tell, this hasn't broken what originally worked either, can anyone elaborate a little on when the .open seems to fix the issue?