jquery.fileupload.js:87 Uncaught TypeError: $.widget is not a function on jQuery-file-upload
jquery.fileupload.js:87 Uncaught TypeError: $.widget is not a function on jQuery-file-upload
我尝试使用 basic example (source) for jquery-file-upload,我在 html 中包含的文件是:
jquery.js
bootstrap.css
bootstrap.js
jquery.fileupload.css
jquery.iframe-transport.js
jquery.fileupload.js
为了正确使用 jquery-file-upload
我还应该包括什么吗?
我的应用不需要使用 jquery-ui
。
如果 jquery-ui
确实是 jquery-file-upload
的依赖项,是否有任何解决方法可以在没有 jquery-ui
的情况下使用它?
没关系,我应该先阅读 this。只需要 jquery-ui.widget.js
,而不是整个 jquery-ui
。
的顺序
<script src="js/vendor/jquery.ui.widget.js"></script>
<script src="js/jquery.iframe-transport.js"></script>
<script src="js/jquery.fileupload.js"></script>
加载也很重要。
jquery.js
jquery.ui.widget.js
jquery.iframe-transport.js
jquery.fileupload.js
最后是
$('#input').fileupload() // and U is lower case !!!!
我尝试使用 basic example (source) for jquery-file-upload,我在 html 中包含的文件是:
jquery.js
bootstrap.css
bootstrap.js
jquery.fileupload.css
jquery.iframe-transport.js
jquery.fileupload.js
为了正确使用 jquery-file-upload
我还应该包括什么吗?
我的应用不需要使用 jquery-ui
。
如果 jquery-ui
确实是 jquery-file-upload
的依赖项,是否有任何解决方法可以在没有 jquery-ui
的情况下使用它?
没关系,我应该先阅读 this。只需要 jquery-ui.widget.js
,而不是整个 jquery-ui
。
<script src="js/vendor/jquery.ui.widget.js"></script>
<script src="js/jquery.iframe-transport.js"></script>
<script src="js/jquery.fileupload.js"></script>
加载也很重要。
jquery.js
jquery.ui.widget.js
jquery.iframe-transport.js
jquery.fileupload.js
最后是
$('#input').fileupload() // and U is lower case !!!!