diff --git a/js/tag-it.js b/js/tag-it.js index 078c264f..c3c0ea94 100644 --- a/js/tag-it.js +++ b/js/tag-it.js @@ -584,6 +584,26 @@ this._tags().each(function(index, tag) { that.removeTag(tag, false); }); + }, + readOnly: function(value) { + this.options.readOnly=value; + + assignedTags=this.assignedTags(); + + this.removeAll(); + + if (this.options.readOnly){ + this.tagInput.attr('disabled', 'disabled'); + + } else{ + this.tagInput.attr('disabled', ''); + } + + for(var i=0; i