The following demonstrates how you could disable/enable a tagit
field.
Updated with David's optimized code.
$('#disable').click(function(){
$('.ui-autocomplete-input').prop('disabled', true).val('');
$('.tagit-choice').remove();
$('.ui-widget-content').css('opacity','.2');
});
$('#enable').click(function(){
$('.ui-widget-content').css('opacity','1');
$('.ui-autocomplete-input').prop('disabled', false);
});
Example
http://jsfiddle.net/davidThomas/j8Eg4/1/
Because you want the field to look like a disabled dropdown I opted for this solution. Another solution that tagit
supports is if you want to stop tags from being added you can utilize the beforeTagAdded (function, Callback)
function. And return false in order to stop new tags from being created...
Here is an example of that.