Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jquery.fileupload.js:87 Uncaught TypeError: $.widget is not a function on jQuery-file-upload

I tried to use basic example (source) for jquery-file-upload, files that I've included in my html are:

jquery.js
bootstrap.css
bootstrap.js

jquery.fileupload.css
jquery.iframe-transport.js
jquery.fileupload.js

Is there anything else that I should include to properly use jquery-file-upload?

My app doesn't need to use jquery-ui. If jquery-ui is really a dependency to jquery-file-upload, is there any workaround to use it without jquery-ui?

like image 378
Kokizzu Avatar asked Apr 20 '15 04:04

Kokizzu


3 Answers

jquery.js
jquery.ui.widget.js
jquery.iframe-transport.js
jquery.fileupload.js

and finally

$('#input').fileupload() // and U is lower case !!!!
like image 162
sajjad Avatar answered Oct 16 '22 15:10

sajjad


Nevermind, I should have read this first. Only jquery-ui.widget.js required, not whole jquery-ui.

like image 39
Kokizzu Avatar answered Oct 16 '22 14:10

Kokizzu


The order in which

<script src="js/vendor/jquery.ui.widget.js"></script>
<script src="js/jquery.iframe-transport.js"></script>
<script src="js/jquery.fileupload.js"></script>

are loaded also matters.

like image 21
Artur Grigio Avatar answered Oct 16 '22 15:10

Artur Grigio