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

前端 未结 24 2014
醉话见心
醉话见心 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:39

    This is the only thing that worked for me for both IE and Google Chrome, I think it's mostly because of the .body.scrollHeight stuff, which works in IE best. I put +30 for Firefox ...

    jQuery.fancybox({
      href: href,
      type: "iframe",
      centerOnScroll: 'true',
      scrolling: 'no',
      width: 650,
      'onComplete': function() {
        jQuery('#fancybox-frame').load(function() {
          jQuery('#fancybox-content').height(this.contentWindow.document.body.scrollHeight + 30);
        });
      }
    });
    

提交回复
热议问题