如何在一个页面中使用多个jquery版本[重复]

时间:2022-04-12 05:49:23

This question already has an answer here:

这个问题在这里已有答案:

how can i use thisthree jquery versions in the same page ,i'am using different codes from differents tutorial that uses different jquery version :

我如何在同一页面中使用thisthree jquery版本,我使用不同的代码来自使用不同jquery版本的不同教程:

    <script src="http://code.jquery.com/jquery-1.9.1.js"></script>      
    <script src="iview/js/jquery-1.7.1.min.js"></script>
    <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>

Thank you

1 个解决方案

#1


5  

The answer is that you really don't need 2 versions of jQuery on the same page. It won't really help. If a certain script doesn't work with a particular version of jQuery, it doesn't mean that you can't use that script. It means that you might have to re-write some parts of the function to be more compatible. Certain functions, such as live and click depreciate after some versions. Just use one or the other.

答案是你真的不需要在同一页面上有两个版本的jQuery。它不会真正有用。如果某个脚本不能与特定版本的jQuery一起使用,则并不意味着您无法使用该脚本。这意味着您可能必须重新编写函数的某些部分才能更兼容。某些版本之后某些功能(如实时和点击)会贬值。只需使用其中一个。

#1


5  

The answer is that you really don't need 2 versions of jQuery on the same page. It won't really help. If a certain script doesn't work with a particular version of jQuery, it doesn't mean that you can't use that script. It means that you might have to re-write some parts of the function to be more compatible. Certain functions, such as live and click depreciate after some versions. Just use one or the other.

答案是你真的不需要在同一页面上有两个版本的jQuery。它不会真正有用。如果某个脚本不能与特定版本的jQuery一起使用,则并不意味着您无法使用该脚本。这意味着您可能必须重新编写函数的某些部分才能更兼容。某些版本之后某些功能(如实时和点击)会贬值。只需使用其中一个。