简体   繁体   English

IE8和IE7中的FancyBox 1.3.4 jquery问题

[英]FancyBox 1.3.4 jquery issue in IE8 and IE7

I was hoping that someone can help me with this fancybox plugin issue. 我希望有人可以帮助我解决这个fancybox插件问题。

Problem is in the IE7 and IE8. 问题出在IE7和IE8中。 Error - SCRIPT87: Could not get the display property. 错误-SCRIPT87:无法获取显示属性。 Invalid argument. 无效的论点。

As I noticed scripts break on this line: 我注意到脚本在此行中断:

            $(fx).animate({prop: 1}, {
                 duration : currentOpts.speedIn,
                 easing : currentOpts.easingIn,
                 step : _draw,
                 complete : _finish
            });

I'm using jquery version 1.4.2 我正在使用jQuery 1.4.2版本

live example and issue on this link: http://goo.gl/x0rF7 实时示例和此链接上的问题: http : //goo.gl/x0rF7

You are adding 3 instances of jQuery when you only need one (ideally the latest version): http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js 当您只需要一个jQuery实例(最好是最新版本)时,您将添加3个jQuery实例: http : //ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js

http://www.crystalhotel-belgrade.rs/test/plugins/content/simplepopup/jquery-1.4.3.min.js http://www.crystalhotel-belgrade.rs/test/plugins/content/simplepopup/jquery-1.4.3.min.js

and an empty call to http://www.crystalhotel-belgrade.rs/test/jomres/javascript/jquery-1.4.2.min.js 并打空电话http://www.crystalhotel-belgrade.rs/test/jomres/javascript/jquery-1.4.2.min.js

.....Also you are loading jQuery UI twice .....您还要两次加载jQuery UI

http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js

http://www.crystalhotel-belgrade.rs/test/jomres/javascript/jquery-ui-1.8.5.custom.min.js http://www.crystalhotel-belgrade.rs/test/jomres/javascript/jquery-ui-1.8.5.custom.min.js

IE is more susceptible to this kind of conflicts/errors than other browsers. IE比其他浏览器更容易发生这种冲突/错误。 Try reducing your calls to a single instance of each script and beware of the order (jQuery first and jQuery plugins after) 尝试减少对每个脚本的单个实例的调用,并注意顺序(先使用jQuery,再使用jQuery插件)

Additionally, make sure that the DOCTYPE is the very first line of your html document (not preceding spaces or comments), otherwise IE will fail to run in standards mode hence fancybox won't work properly. 此外,请确保DOCTYPE是HTML文档的第一行(而不是空格或注释),否则IE将无法在标准模式下运行,因此fancybox无法正常工作。

Problem fixed. 问题已解决。

Not the best way but it working 不是最好的方法,但它能正常工作

$(fx).animate({prop: 1}, {
                 duration : currentOpts.speedIn,
                 easing : currentOpts.easingIn,
                 step : _draw,
                 complete : _finish
            });

I removed all animation and just wrote 我删除了所有动画,只是写了

_finish();

Thanks for the answer JFK, I tryed with that but no 感谢肯尼迪国际机场的答案,我尝试过但没有

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM