tag-it
tag-it copied to clipboard
Make autocomplete dependency optional
In case autocomplete feature is not used the dependency on jquery UI autocomplete is not required.
A boolean flag autocompleteEnabled would be nice.
Alternate
It can be made optional by checking if the autocomplete function is available. I prefer a boolean flag.
http://stackoverflow.com/questions/85815/how-to-tell-if-a-javascript-function-is-defined#85973
Changes following check to lines:
if(typeof(that.tagInput.autocomplete) === typeof(Function))
- 270: on enter key
- 285: if condition where autocomplete is created