jQuery - Fancybox: But I don't want scrollbars!

前端 未结 24 1992
醉话见心
醉话见心 2020-12-15 17:37

I am using jQuery Fancybox for a popup registration form here

I would like the form to come up at the size of 450px by 700px but no matter what I set the height and

24条回答
  •  不思量自难忘°
    2020-12-15 17:41

    I struggled quite a bit with this, only to find the answer within the Fancybox documentation.

    As hinted above, first I thought it would have been as easy as this to disable scrolling:

    $('.fancybox').fancybox({'type': 'iframe', 'scrolling': 'no', 'width': 500})
    

    Just setting the 'scrolling' option to 'no' was not enough, though. I had to repeat the same thing in the 'iframe' option, like this:

    $('.fancybox').fancybox({
      'type': 'iframe', 
      'scrolling': 'no', 
      'width': 500, 
      'iframe': {'scrolling': 'no'}
    })
    

提交回复
热议问题