From 95937beaadd3c8160c06c29626913740e522a8df Mon Sep 17 00:00:00 2001 From: Julen Ruiz Aizpuru Date: Wed, 17 Aug 2011 19:26:23 +0200 Subject: [PATCH 1/2] Added a setting to optionally animate tag removals. --- js/tag-it.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/tag-it.js b/js/tag-it.js index 3b6d5938..2d2a592c 100644 --- a/js/tag-it.js +++ b/js/tag-it.js @@ -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); From 00a37527e3be52ee1f3bdfabc669123ea810e87b Mon Sep 17 00:00:00 2001 From: Julen Ruiz Aizpuru Date: Wed, 17 Aug 2011 19:28:53 +0200 Subject: [PATCH 2/2] Update comment; the animate argument doesn't exist. --- js/tag-it.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/tag-it.js b/js/tag-it.js index 2d2a592c..f08a52f0 100644 --- a/js/tag-it.js +++ b/js/tag-it.js @@ -369,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);