简体   繁体   English

Jquery不在IE9 RC中工作

[英]Jquery not working in IE9 RC

I have just upgraded to IE9 RC (which i must add isnt too bad an attempt by microsoft, so far, they still have time to mess it up! Please dont comment below on how wonderful/rubbish you think it is, I dont want a browser war! ) in order to test websites. 我刚刚升级到IE9 RC(我必须添加并不是微软的尝试太糟糕了,到目前为止,他们还有时间搞砸了! 请不要在下面评论你认为它是多么美妙/垃圾,我不想要一个浏览器大战! )以测试网站。

Now I understand its only a release candidate, and is still being developed, but for some reason none of jQuery on my site is not being rendered properly (I say not rendering properly, I really mean not working fullstop). 现在我理解它只是一个候选版本,并且仍在开发中,但由于某些原因,我网站上的jQuery没有被正确呈现(我说没有正确渲染,我的意思是不能正常工作)。

The only way to get it to work is to use IE9 Browser Mode and IE8 Standards. 让它工作的唯一方法是使用IE9浏览器模式和IE8标准。 Using IE9 Broswer Mode and IE9 Standards stops the jQuery working. 使用IE9 Broswer模式和IE9标准可以阻止jQuery的运行。

I understand im probably going to have to wait until they either ugrade IE or the jQuery API but does anyone know why this is or possibly have a fix? 我知道我可能要等到他们要么升级IE或者jQuery API,但是有人知道为什么这是或者可能有修复?

Cheers guys! 干杯啦!

UPDATE UPDATE

Ok so then guys you can either go back to jQuery V1.4 or use this release candidate of jQuery v1.5 - http://code.jquery.com/jquery-1.5.1rc1.js 那么大家好,你可以回到jQuery V1.4或使用jQuery v1.5的这个候选版本 - http://code.jquery.com/jquery-1.5.1rc1.js

First off check if some of your code is incorrect in your $(document).ready() . 首先检查你的$(document).ready()是否有一些代码不正确。 if that all looks fine reload your page and hit F12 click the script tab then click start debugging and it will reload the page and halt it with a break point at your error in javascript. 如果所有看起来都很好重新加载您的页面并点击F12单击脚本选项卡然后单击开始调试它将重新加载页面并在javascript中出现错误的断点。

jQuery does work in IE9 RC I use it myself for testing. jQuery在IE9 RC中工作我自己用它进行测试。

However if your doing some thing IE don't support near the top of your $(document).ready() it could be preventing the rest of the page from loading. 但是,如果你做了一些事情,IE不支持靠近你的$(document).ready()的顶部,它可能会阻止页面的其余部分加载。

If this is down to console.log there is a good way to prevent IE from haling of console.log : 如果这是关于console.log有一个很好的方法来防止IE浏览器console.log

if(console == undefined){ console = {log:function(){}}; }

I used IE9 on my laptop at my old job and it worked fine with jquery. 在我以前的工作中,我在我的笔记本电脑上使用了IE9,它在jquery上工作正常。 And I was just listening in on the jquery dev meeting a couple of days ago and even on that they mentioned that only a couple of test cases fail. 我几天前刚刚在jquery dev会议上听,甚至他们提到只有几个测试用例失败了。 You may be having some other issue, maybe a security setting or something. 您可能遇到其他问题,可能是安全设置或其他问题。

jQuery 1.5 had some troubles with IE9. jQuery 1.5在IE9上遇到了一些麻烦。 I switched back to latest 1.4 and works ok. 我切换回最新的1.4并且工作正常。

为了使用getElementsById标记,您需要使用Release Candidate,因为这已经解决了问题。

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

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