简体   繁体   中英

Adding scrollbars to fancybox on resize

I have a popup form that I am presenting with Fancybox 2 using the following code:

$(link).fancybox({
    type: 'iFrame',
    autoSize: false,
    autoScale: false,
    width: '1280px',
    height: '1024px',
    iFrame: {
        scrolling: 'auto'
    }
});

The form has several dropdown boxes that I am styling using the Chosen jQuery plugin. Since they are multiple select, they end up resizing the page and pushing the content off the bottom. I would like, when the content resizes, to have a vertical scrollbar appear on the fancybox. I've tried setting the iFrame scrolling to auto and also to yes with no result. I've also added a scrolling attribute outsize the iFrame attribute and that did not help either. Can someone tell me how to accomplish this?

看起来你有拼写错误的选项iFrame ,它应该是iframe

Well, the answer ultimately didn't have anything to do with Fancybox. Someone had added an overflow:hidden to the html and body elements in my stylesheet. I have no idea what the reasoning was behind that, but I will find out.

As an aside, it would be nice if downvoters would leave a comment. It's a little frustrating to ask a legitimate question and it get downvoted for no apparent reason. If I need to ask something better, then let me know. It's certainly the only way I'll learn.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM