我的jQuery不工作与IE11 [英] My jQuery is not working with IE11

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

问题描述

所以我有三个代码来加载东西到div,做其他的事情。但它不支持Internet Explorer,我检查IE11控制台,这是我得到的

So I got three pieces of code to load stuff into div and do other things. But it doesn't work with Internet Explorer, I checked IE11 console and that's what I got

SCRIPT5009: '$' is undefined

奇怪的是,在每一个其他浏览器工作正常,我试图谷歌它,但没有找到任何解决方案。

That's odd, in every other browser it works fine, I tried to google it but didn't find any solution to this.

以下是我的jQuery:

Here's my jQuery:

<script type="text/javascript">
    $('#description').load('descr/portDefault.htm');
    $('#portNav').load('menus/default.htm');

@edit

我想我忘了把整个代码,这里是: http:// pastebin.com/xCL1e7Fh
这个html是另一个html文件中的iframe,如果这有区别。

I guess I forgot to put the entire code, here it is: http://pastebin.com/xCL1e7Fh This html is an iframe in another html file if that makes a difference.

推荐答案

<meta http-equiv="X-UA-Compatible" content="IE=edge;chrome=1" />

它工作,但是触发了我检查IE11中的相似性设置。
对于上一个项目,我已将localhost添加到兼容性视图设置中的列表。

It worked, but that triggered me to check compatablity settting in IE11. For a previous project I had added localhost to the list in the Compatability View Settings.

清除列表,现在可以正常工作。

Cleared the list and it works well now (without the meta tag).

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

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