Skip to content

Commit

Permalink
Merge pull request aehlke#17 from julen/master
Browse files Browse the repository at this point in the history
Animating tag removals should be optional
  • Loading branch information
aehlke committed Aug 17, 2011
2 parents f868ea9 + 00a3752 commit 440b9b7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions js/tag-it.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
//
Expand Down Expand Up @@ -341,7 +344,7 @@
},

removeTag: function(tag, animate) {
if (typeof animate === 'undefined') { animate = true; }
animate = animate || this.options.animate;

tag = $(tag);

Expand All @@ -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);
Expand Down

0 comments on commit 440b9b7

Please sign in to comment.