aehlke / tag-it

A jQuery UI plugin to handle multi-tag fields as well as tag suggestions/autocomplete.
http://aehlke.github.com/tag-it/
MIT License
2.48k stars 825 forks source link

Uncaught TypeError: $(...).tagit is not a function #399

Open hamzazafeer opened 6 years ago

hamzazafeer commented 6 years ago

I am facing this issue, while i also add jquery and jquery UI.

`Uncaught TypeError: $(...).tagit is not a function

at HTMLDocument.<anonymous> (post-piece-new.php:25)
at c (jquery.min.js:4)
at Object.fireWith [as resolveWith] (jquery.min.js:4)
at Function.ready (jquery.min.js:4)
at HTMLDocument.q (jquery.min.js:4)`

How can i get rid of this? this is working on local server, but not working online.

userdefinable commented 6 years ago

Check the order you are pulling in the Javascript. I have it: jquery.min.js then jquery-ui.min.js then tagit

Ensure all three are being loaded for the page in question. If you have tag-it loading after the page has finished e.g. via ajax then you will need to initialise Tag-it in that load.

Failing that try checking/changing the jquery and jquery UI versions.