Permalink
Browse files

Merge pull request #17 from julen/master

Animating tag removals should be optional
  • Loading branch information...
2 parents f868ea9 + 00a3752 commit 440b9b70b4c80ddf4f02a4e41a0c186f8a865bac @aehlke aehlke committed Aug 17, 2011
Showing with 5 additions and 2 deletions.
  1. +5 −2 js/tag-it.js
View
@@ -39,6 +39,9 @@
// for inputting multi-word tags.
allowSpaces: false,
+ // Whether to animate tag removals or not.
+ animate: true,
+
// The below options are for using a single field instead of several
// for our form values.
//
@@ -341,7 +344,7 @@
},
removeTag: function(tag, animate) {
- if (typeof animate === 'undefined') { animate = true; }
+ animate = animate || this.options.animate;
tag = $(tag);
@@ -366,7 +369,7 @@
},
removeAll: function() {
- // Removes all tags. Takes an optional `animate` argument.
+ // Removes all tags.
var that = this;
this.tagList.children('.tagit-choice').each(function(index, tag) {
that.removeTag(tag, false);

0 comments on commit 440b9b7

Please sign in to comment.