Fancybox-2 not showing PDF in IE-8

佐手、 提交于 2019-12-11 11:54:15

问题


Can't get Fancybox-2 to show PDFs with Internet Explorer! (It works fine in Chrome and Firefox)

In <head> I have this code:

<!DOCTYPE HTML>

<!-- Add fancyBox -->

<link rel="stylesheet" href="../../../js/fancybox/source/jquery.fancybox.css" type="text/css" media="screen"/>
<script type="text/javascript" src="../../../js/fancybox/source/jquery.fancybox.pack.js"></script>


<script type="text/javascript">
    $(document).ready(function () {
        $(".fancybox").fancybox({
            height: '100%',
            // width: '50%',
            //openEffect  : 'none',
            // closeEffect : 'none',
            iframe: {
                preload: false
            },
            afterShow: function () {
                $(".fancybox-wrap").draggable();
            },
            beforeLoad: function () {
                this.title = $(this.element).attr('caption');
            }

        });
    });

</script>

then in <body> I have:

<a class="fancybox" data-fancybox-type="iframe" caption="my test" href="PDF/test.pdf" target="_blank" title="test PDF"><img style="border:0;" src="../img/pdficon.png "></a>

How can I get it to work, in your opinion?

来源:https://stackoverflow.com/questions/22385496/fancybox-2-not-showing-pdf-in-ie-8

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