jQuery没有冲突仍然与其他版本的jQuery发生冲突

编程入门 行业动态 更新时间:2024-10-28 08:29:40
本文介绍了jQuery没有冲突仍然与其他版本的jQuery发生冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试将双滑块插件与estalge视图框一起运行.它们都使用jQuery,并且分别工作,但是当我将它们放在一起时,就会中断.我尝试实现jQuery无冲突规则,但我认为我可能在某处缺少一个小细节.到目前为止,我的编码如下:

I am trying to run the dual slider plugin alongside with an estalge view-box. They both use jQuery, and work separately but when i placed them together, one breaks. I have tried implementing the jQuery no conflict rule, but i think i may be missing a small detail somewhere. My coding so far looks like :

<script src="scripts/jquery-1.3.2.min.js" type="text/javascript"></script> <script src="scripts/jquery.easing.1.3.js" type="text/javascript"></script> <script src="scripts/jquery.timers-1.2.js" type="text/javascript"></script> <script src="scripts/jquery.dualSlider.0.3.js" type="text/javascript"></script> <!-- START ESTALGE --> <script src="js/jquery-1.6.2.min.js"></script> <script src="js/jquery.etalage.min.js"></script> <script type="text/javascript"> $.noConflict(); jQuery(document).ready(function($) { jQuery('#etalage').etalage(); }); $(".carousel").dualSlider({ auto:true, autoDelay: 6000, easingCarousel: "swing", easingDetails: "easeOutBack", durationCarousel: 1000, durationDetails: 500 }); </script>

任何帮助将不胜感激.谢谢

Any help would be greatly appreciated. Thank You

推荐答案

您错误地使用了noConflict.

<script src="scripts/jquery-1.3.2.min.js" type="text/javascript"></script> <!-- INCLUDE ANY SCRIPTS HERE THAT RELY ON 1.3.2 --> <script type="text/javascript"> // HERE WE CAN USE 1.3.2 // re-assign 1.3.2 to a new variable so we can use it later var $jq132 = $.noConflict(); </script> <script src="js/jquery-1.6.2.min.js"></script> <script type="text/javascript"> // $ is now 1.6.2 and $jq132 is 1.3.2, both can be used. </script>

更多推荐

jQuery没有冲突仍然与其他版本的jQuery发生冲突

本文发布于:2023-10-22 09:24:27,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1517111.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:发生冲突   冲突   版本   与其他   jQuery

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!