Fancybox 1.3.4 not working in IE

♀尐吖头ヾ 提交于 2019-12-24 20:17:13

问题


I have an .swf movie embedded in fancybox on this site: http://www.courtyarddental.co.uk

This works as expected in all browsers except IE, where I just get the greyed-out screen but no pop-up box.

Any help much appreciated!


回答1:


That was an old issue and we never knew exactly what was the reason. Basically fancybox v1.3.x won't display "object" elements with "data" attribute (IE6/7/8) like in your code

<object type="application/x-shockwave-flash" data="the_courtyard.swf" width="640" height="360">

you can see the old thread here back in January 2010

additionally, linking inline content has other issues; see here

I would recommend you to link the video directly like

<a href="http://www.courtyarddental.co.uk/the_courtyard.swf" id="movie"><img width="207" height="117" border="0" title="Play the video" alt="Play the video" src="http://www.courtyarddental.co.uk/images/video-btn.png"></a>

and use this script

$(document).ready(function() {
    $('#movie').fancybox({
    'padding': 0, //optional
    'width': 640, 
    'height': 360,
    'type': 'swf',
    'autoScale': false
    });
});

that works fine for most browsers including IE7+

a demo here




回答2:


SWF loads and plays fine for me under IE 9.0.8112.18641, Flash player 11.0.1.152. (Does not auto-start, I need to click the swf play button to start the movie.)

Possible caching issue?

Also, your box doesn't appear to be large enough; I am seeing both horizontal and vertical scrollbars for the div containing the SWF.



来源:https://stackoverflow.com/questions/8345855/fancybox-1-3-4-not-working-in-ie

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