Javascript jQuery UI TypeError:e.widget.extend 不是函数
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13631325/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
jQuery UI TypeError: e.widget.extend is not a function
提问by Johnson_145
I have updated my jQuery files including jQUery UI to use the tooltip feature.
我已经更新了包括 jQUEry UI 在内的 jQuery 文件以使用工具提示功能。
But now Javascript is dieing with the following error:
但是现在 Javascript 因以下错误而死亡:
TypeError: e.widget.extend is not a function
Can anyone help me?
谁能帮我?
回答by Johnson_145
jQuery Ui was included twice (second time hidden because of another bug) problem solved
jQuery Ui 被包含两次(第二次隐藏是因为另一个错误)问题解决了
回答by Ali Adravi
I was getting the similar error for tag-it.min.js
我收到了 tag-it.min.js 的类似错误
b.widget is not a function tag-it.min.js
b.widget 不是函数 tag-it.min.js
When I check, found my files were loading in this case
当我检查时,发现我的文件在这种情况下正在加载
<script src="/scripts/tag-it.min.js">
<script src="/scripts/jquery-ui-1.11.1.js">
Just reverse the order and it is fixed
只需颠倒顺序即可修复
Might be it can help someone
可能它可以帮助某人
回答by Markus
I had to add wp_deregister_script( 'jquery-ui-widget' ); to admin-footer.php for an exception for widgets.php file only.
我不得不添加 wp_deregister_script( 'jquery-ui-widget' ); admin-footer.php 仅用于 widgets.php 文件的例外。

