【发布时间】:2013-01-26 00:32:23
【问题描述】:
我遇到了一个问题,我有多个插件在他们的 jquery 版本上发生冲突。现在我搜索了谷歌,我知道你最终应该只使用一个版本的 jquery 并将你的代码更新到那个版本的 jquery。但是,出于好奇,我很想知道当您执行以下操作时会发生什么:
<include latest jquery>
<include script that uses jquery> <---and this jquery code is called back or triggered in some event handler function.. what happens then? what jquery $ version is used? the last jquery object that was added (the 'yet another version of jquery' )
<include some other version of jquery>
<include yet another version of jquery>
使用什么版本的jquery?为什么?究竟发生了什么,每个脚本的加载和执行是如何发生的?它只是调用最新的 jquery 的 $ 别名吗?谢谢你的帮助。
【问题讨论】:
-
是什么让你说他们有冲突?他们使用什么版本?大多数版本向后兼容到 1.3
标签: javascript jquery compilation interpreter