Javascript Jquery多版本noConflict不起作用
我在同一页中使用jquery 1.8.3和1.10.2。但我不能使用Jquery的noConflict方法。 1.10.2适用于Javascript Jquery多版本noConflict不起作用,javascript,jquery,Javascript,Jquery,我在同一页中使用jquery 1.8.3和1.10.2。但我不能使用Jquery的noConflict方法。 1.10.2适用于 jQuery.noConflict(); $(函数(){ $('.header-bottom').stickyNavbar({ activeClass:“active”//要添加以突出显示nav的类 以下是避免jquery多版本冲突的方法 <!-- load jQuery 1.8.3 --> <script type="text/javascrip
jQuery.noConflict();
$(函数(){
$('.header-bottom').stickyNavbar({
activeClass:“active”//要添加以突出显示nav的类
以下是避免jquery多版本冲突的方法
<!-- load jQuery 1.8.3 -->
<script type="text/javascript" src="http://example.com/jquery-1.8.3.js"></script>
<script type="text/javascript">
var jQuery_1_8_3 = $.noConflict(true);
(function($){
// here $ points to the old jQuery
})(jQuery_1_8_3);
</script>
<!-- load jQuery 1.10.2 -->
<script type="text/javascript" src="http://example.com/jquery-1.10.2.js"></script>
<script type="text/javascript">
var jQuery_1_10_2 = $.noConflict(true);
(function($){
// here $ points to the old jQuery
})(jQuery_1_10_2);
</script>
var jQuery_1_8_3=$.noConflict(true);
(函数($){
//这里$指向旧的jQuery
})(jQuery_1_8_3);
var jQuery_1_10_2=$.noConflict(true);
(函数($){
//这里$指向旧的jQuery
})(jQuery_1_10_2);
先显示你的代码,然后可能会给你一个准确的答案。我添加了代码的开头@Dipakchavdacan你可以发布整个html吗?我怎么做。Stackoverflow不允许这样做担心我错了,我再次尝试了你的编辑,现在可以了,非常感谢:)你能给一个声誉吗。这个主题在谷歌上找不到
<!-- load jQuery 1.8.3 -->
<script type="text/javascript" src="http://example.com/jquery-1.8.3.js"></script>
<script type="text/javascript">
var jQuery_1_8_3 = $.noConflict(true);
(function($){
// here $ points to the old jQuery
})(jQuery_1_8_3);
</script>
<!-- load jQuery 1.10.2 -->
<script type="text/javascript" src="http://example.com/jquery-1.10.2.js"></script>
<script type="text/javascript">
var jQuery_1_10_2 = $.noConflict(true);
(function($){
// here $ points to the old jQuery
})(jQuery_1_10_2);
</script>