TagsInput test
by Edward
HTML
<link rel="stylesheet" href="http://code.jquery.com/ui/1.8.18/themes/smoothness/jquery-ui.css">
<link rel="stylesheet" href="http://xoxco.com/projects/code/tagsinput/jquery.tagsinput.css">
<script src="https://raw.github.com/xoxco/jQuery-Tags-Input/rewrite/jquery.tagsinput.js"></script>
<input name="tags" class="tags" value="foo,bar,baz" />
JavaScript
$('.tags').tagsInput({
autocomplete: { source: ['test','two','four'] },
onAddTag:function() {
console.log('Add', this, arguments);
},
validateTag: function(tag) {
console.log('Validate', this, arguments);
return tag != 'Bob';
}
});