I am using Fancybox v2.1.5 to download html content. The content will be uploaded by the client to the CMS, so I need the iframe height to be dynamic. The problem I am facing is that no matter what settings I can change, I can not get it to close the content at a certain height and apply the scroll bar.
The client would like the iframe to go beyond the viewport, so you will need to scroll the entire page to read the entire article. I'm a little stuck.
$('.fancybox').fancybox({
maxWidth: 800,
width: '70%',
fitToView: false,
autoSize: false,
scrolling: 'no',
height: 'auto',
closeClick: false,
padding: 0,
beforeShow: function () {
$('.fancybox-inner').css({
'border-radius': '10px',
'padding-top': '15px',
'background-color': '#e7e7e7'
});
}
});
Run codeHide result
source
share