jquery noConflict仅在IE8中不起作用 [英] jquery noConflict not working in IE8 only

查看:173
本文介绍了jquery noConflict仅在IE8中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用prootype框架的网站,我希望使用jquery插件。一切都不适用于IE8。它在ie7中工作让我感到惊讶。知道什么可能是错的吗?

I have a website using the prootype framework and I am looking to use a jquery plugin. Everything works just not in IE8. It works in ie7 which amazes me. Any idea what maybe wrong?

IE8给我的对象不支持这个属性或方法,其中行jQuery.noConflict();是

IE8 gives me object doesnt support this property or method where line jQuery.noConflict(); is

<script src="/my/docs/jquery.js" type="text/javascript"></script>
<script src="/my/docs/jquery.simplyscroll.js" type="text/javascript"> </script>
<script type="text/javascript">
jQuery.noConflict();
function OpenUp(sURL){
  window.open(sURL,null,'height=560,width=820,status=yes,toolbar=yes,menubar=yes,location=yes,resizable=yes,scrollbars=yes',false); 
}
jQuery(document).ready(function($) {
 $("head").append("<link>");
 css = $("head").children(":last");

 css.attr({
   rel:  "stylesheet",
   type: "text/css",
   href: "/my/docs/jquery.simplyscroll.css"
     });

     $("#scroller").simplyScroll({
       autoMode: 'loop',
       framerate: 1,
       speed: 1
     });
});
</script>

我也厌倦了以下内容: var $ j = jQuery.noConflict() ; var j = jQuery.noConflict();

I also tired the following: var $j = jQuery.noConflict(); var j = jQuery.noConflict();

everythig仅在IE8中不起作用。

everythig works just not in IE8 alone.

推荐答案

我也使用jQuery-1.4.4.js遇到了这个问题。除IE8外,一切正常。 IE8无法识别jQuery()。我能够通过在加载Prototype之前加载jQuery并运行$ .noconflict()来解决问题,并且它在我的所有测试浏览器(包括IE8)上运行良好。这个序列与jQuery文档相反,因此我很担心它。在jQuery网站上找不到任何关于它的内容。

I've run into this also using jQuery-1.4.4.js. Everything works fine except in IE8. IE8 does not recognize jQuery() anything. I was able to resolve the problem by loading jQuery and running $.noconflict() prior to loading Prototype and it all runs fine on all my test browsers including IE8. This sequence is contrary to the jQuery documentation and therefore I'm nervous about it. Can't find anything on the jQuery site about it.

t22harris

t22harris

这篇关于jquery noConflict仅在IE8中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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