Skip to content

Commit

Permalink
The tagSource option could just be a URL string (as jQueryUI's autoco…
Browse files Browse the repository at this point in the history
…mplete accepts). Don't bind the callback in that case.
  • Loading branch information
GUI committed Aug 18, 2011
1 parent 453e113 commit 565a6e4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion js/tag-it.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@
});
showChoices(this._subtractArray(choices, this.assignedTags()));
};
this.options.tagSource = $.proxy(this.options.tagSource, this);

// Bind tagSource callback functions to this context.
if ($.isFunction(this.options.tagSource)) {
this.options.tagSource = $.proxy(this.options.tagSource, this);
}

this.tagList
.addClass('tagit')
Expand Down

0 comments on commit 565a6e4

Please sign in to comment.