Fancybox stuck loading iframe in IE

后端 未结 2 832
一生所求
一生所求 2020-11-28 15:28

I\'m having problems loading a PDF in an iframe in IE using fancybox. When I click the link, I get the gif loader and it just spins forever. No errors in the console or on t

2条回答
  •  执笔经年
    2020-11-28 15:46

    It seems like disabling pre-loading fixes the issue with iframes and IE so try this :

      $(document).ready(function () {
          /* fancybox handler */
          $('.fancybox-media').fancybox({
              openEffect: 'none',
              closeEffect: 'none',
              autoSize: true,
              type: 'iframe',
              iframe: {
                  preload: false // fixes issue with iframe and IE
              }
          });
      });
    

    Tested with fancybox v2.1.4 and IE7.

    Check JSFIDDLE

提交回复
热议问题