jQuery不能在IE AHHH中工作? [英] jQuery not working in IE AHHH?

查看:95
本文介绍了jQuery不能在IE AHHH中工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为客户制作的网站在这里: http://vicewebdesign.com/resonantlight_com/



它在chrome和firefox中完美运行但在IE非插件(jquery)工作中,有3个diff jquery插件,主页hre有一个nivo滑块在IE中不工作: http://vicewebdesign.com/resonantlight_com/



'p>在tabify插件福隆此PAG心不是工作在IE:HTTP://vicewebdesign.com/resonantlight_com/perl



和也在同一页上的quovolver插件无法正常工作。



我搜索过这个很多,我找到的所有ansers都是特定于插件的,我的prblem是没有我的jquery正在工作。我试过差异库代码脚本,如不同的版本和所有和最新的。但没有任何效果!

解决方案

问题在于IE9现在正在遵守标准,这会给插件试图绕过预设带来问题IE9问题。



一种可能的解决方案是使用此元标记强制IE9进入IE8标准模式:

 < meta http-equiv =X-UA-Compatiblecontent =IE = 8>< / meta> 

另一种选择是修复代码:



大多数UI插件驻留在 $。browser.msie 上,以检查我们是否在IE中,但他们不检查版本。在我的例子中,解决方案(jquery.ui.checkbox.js)用这个变量替换所有 $。browser.msie 调用:

  var isIEAndVersionIsLowerThan9 = $ .browser.msie&& (parseInt($。browser.version,10)< 9); 

此解决方案优于添加元标记,因为它将启用所有IE9功能。


My website I am making for a client is here : http://vicewebdesign.com/resonantlight_com/

It works perfectly in chrome and firefox but in IE non of the plugins (jquery) work, There are 3 diff jquery plug ins, the home page hre has a nivo slider not working in IE : http://vicewebdesign.com/resonantlight_com/

The tabify plugin foron this pag isnt working in IE :http://vicewebdesign.com/resonantlight_com/perl

and also on the same page the quovolver plug in isnt working.

I have searched this alot and all the ansers I find are specific to a plug in and my prblem is NONE of my jquery is working. I tried diff library code script like differnt versions and all and latest. But nothing working !

解决方案

The problem is that IE9 is now adhering to standards and this gives problems with plugins trying to circumvent the pre IE9 problems.

One possible solution is to force IE9 in IE8 standards mode with this meta tag:

 <meta http-equiv="X-UA-Compatible" content="IE=8"></meta> 

the other option is to fix the code:

most UI plugins reside on $.browser.msie to check if we are in IE but they don't check the version. In my case the solution (jquery.ui.checkbox.js) was to replace all $.browser.msie calls with this variable :

var isIEAndVersionIsLowerThan9 = $.browser.msie && (parseInt($.browser.version, 10) < 9);

This solution is better than adding the meta tag as it will enable all IE9 features.

这篇关于jQuery不能在IE AHHH中工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆