Fancybox giving white page in ifame on IE7

旧城冷巷雨未停 提交于 2019-12-13 04:23:50

问题


I am using

<a href="content.aspx?id=21" class="fancybox fancybox.iframe">Content</a> 

to show this content in iFrame in fancybox.

But in IE7 fancybox coming white blank box. Any body have any idea to solve this issue?


回答1:


If using the latest version of fancybox (v2.1.4) try disabling the iframe preload in your custom script like :

$(".fancybox").fancybox({
    iframe : {
        preload: false
    }
});



回答2:


This is a right solution, but iframe preload can be usefull in many cases. The only case we need to disable iframe preloading is under IE7 and older ugly browsers, so I suggest to replace the

iframe: {
    preload: false
}

by

iframe: {
   preload: !(document.all && !document.querySelector)
}


来源:https://stackoverflow.com/questions/16772008/fancybox-giving-white-page-in-ifame-on-ie7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!