jquery - 在 IE 中以 IFRAME 模式加载 PDF

标签 jquery colorbox

我只是看到当我加载 PDF 文件时,加载叠加层不会在 IE 中消失...

$.extend($.colorbox.settings, {
    transition: "none",
    opacity: 0.6,
    iframe: false,
    fastIframe: false,
    returnFocus: true,
    escKey: false,      // do not close when ESC is pressed
    overlayClose: false,    // do not close when overlay is clicked
    initialWidth : 872,
    initialHeight : 465,
    innerWidth : 872,
    innerHeight : 465});

$.colorbox({
    iframe: true,
    data: null, 
    href : 'myPDFurl',
    title : 'Load PDF in IFRAME',
    onComplete : function() {
        alert('document loaded !');
    }
});

“文档已加载!”消息也没有出现。

提前致谢,

德维扬

最佳答案

试试这个:

$(function(){
    $.colorbox({
        iframe: true,
        innerWidth:425, innerHeight:344,
        href : 'url',
        title : 'Load PDF in IFRAME',
        onComplete : function() {
            alert('document loaded !');
        }
    });
});

演示:http://jsfiddle.net/EcqJP/

关于jquery - 在 IE 中以 IFRAME 模式加载 PDF,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12859812/

相关文章:

javascript - 模态窗口不适用于分页数据表

javascript - Jquery:如何突出显示选中的单选按钮 block

javascript - !function ($){...}(window.jQuery) 到底是做什么的?

javascript - 尝试使用 webpack 要求部分 jquery

javascript - jQuery 插件 - 在变量上调用插件方法

javascript - 如何更新 colorbox 中的基础数据?

javascript - 如何显示两个颜色框(弹出窗口)?

jquery - 类名为 'x' 的引用 $(this).parent

jQuery 和 Colorbox : How to automatically set the height and width of an iframe colorbox

javascript - Drupal 8 和 colorbox