Download
User Rating: 0/5 ( 0 votes)
Taginput is a jQuery plugin for creating tags in an input field. I am aware of the fact that there are already a couple of implementations for this usecase.
Currently the plugin is in a very early stage and under heavy development (hopefully...)
Source: github.com
1. INCLUDE CSS AND JS FILES
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css">
<link rel="stylesheet" href="src/jquery.taginput.css">
<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.js"></script>
<script src="bower_components/google-code-prettify/src/prettify.js"></script>
<script src="src/jquery.taginput.src.js"></script>
2. HTML
<input id="taginput-bootstrap" type="text" placeholder="Add tag" />
3. JAVASCRIPT
$('#taginput-bootstrap').taginput({
style: 'bootstrap'
});
4. OPTIONS
style: 'jquery',
separateKeyCodes: [ keys.WHITESPACE, keys.ENTER, keys.TAB ],
placeholder: 'Add tag...',
allowMultiple: false,
caseSensitive: false,
onExists: function($tag) {
$tag.hide().fadeIn();
},
tagLabel: function(tag){
return tag;
},
tagValue: function(tag){
return tag;
}