需要一起使用jquery-1.min.js和jquery.min.js [英] need to use jquery-1.min.js and jquery.min.js together

查看:214
本文介绍了需要一起使用jquery-1.min.js和jquery.min.js的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要同时使用下面的文件,但只有其中一个可以工作,如果两个pae中使用

I need to use both below files but just one of the can work if both of the use in pae

<script src="jquery.min.js"></script> 
<script src="jquery-1.min.js"></script>//just this work

或者如果变更单

<script src="jquery-1.min.js"></script> 
<script src="jquery.min.js"></script>//just this work

我使用了一个拖放插件,这需要jquery.min.js和我的主题需要jquery-1.min.js才能响应

I use a drag and drop plugin , this need jquery.min.js and my theme need to jquery-1.min.js for be responsive

推荐答案

使用noConflict时应该可以这样做。

You should be able to do this when you use noConflict.

<!-- load jQuery-1 -->
<script type="text/javascript" src="jquery-1.min.js"></script>
<script type="text/javascript">
    var jQuery_1_min = $.noConflict(true);
</script>

<!-- load jQuery -->
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript">
    var jQuery_min = $.noConflict(true);
</script>

现在,无论何时您需要其中一个文件,您都可以执行此操作。

Now whenever you need one of these files you can do this.

//example
$jQuery_min('.selector').live('click', function(){  
    //do something  
});  

如果它仍然不能工作,我就不知道了......这是每个人都这样做的方式。快速谷歌搜索。

If it still wont work I dont know anymore... This is the way everybody does it. Quick google search.

这篇关于需要一起使用jquery-1.min.js和jquery.min.js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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