我已将 jQuery 1.7.1 替换为 jQuery 1.9.2,并且我的一些自定义构建 ui 脚本和 jQuery 提供的 UI 库也出现以下错误。以下是错误。
此外,我已将 jQuery UI 库升级到 1.10.0
以下是我遇到的错误,还有更多。
Uncaught TypeError: Cannot read property 'element' of undefined
'e.widget._close'
(anonymous function)
e.widget.close
(anonymous function)
'_on.blur'
u
b.event.dispatch
v.handle
Uncaught TypeError: Object [object Object] has no method 'menu'
cannot call methods on myCustomOverlay prior to initialization; attempted to call method 'isOpen'
有什么需要注意的吗?请指导我如何从 1.7.1 迁移到 1.9.1
最佳答案
许多旧的代码库已被完全修改,或在最新的 1.9 版本中被弃用,因此提供了一个迁移插件来恢复一些已删除的功能,以帮助将您的项目过渡到较新版本jQuery。
您可以在其官方下载页面 here 上找到 jQuery Migrate 插件。您还拥有 @dgvid 提到的迁移指南 here .
关于jquery - 从 jQuery 1.7.1 迁移到 jQuery 1.9.2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14988437/