-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove all tags/Reinitialize #31
Comments
The library itself doesn't support it. Is the use case that a user would want to clear all the tags at once? You could clear them all with something like (nb: there may be syntax errors here): var tagger = $('.tags').getTags();
var currentTags = tagger.getTags();
var i;
for (i = 0; i < currentTags.length; i++) {
tagger. removeTag(currentTags[i]);
} |
I had the same problem, then I created a tricky solution: |
couldn't find destroy method which is needed for SPA applications for cleaning resources... |
@maxwells I second this request. This seems like a basic requirement. The code that you provide only removes all tags up to the last one. Why doesn't it also remove the last tag as well? Why do you have a removeTag function and a removeLastTag? Couldn't you take this loop and stick it in a new function called removeTags()? |
…e issue "Remove all tags/Reinitialize maxwells#31" Can be view in demo3.html
I have tried some workaround for this it works for me pefectly. |
How can we remove all tags from the input box?
The text was updated successfully, but these errors were encountered: