Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fdeschenes/bootstrap-tag
A javascript plugin for Twitter Bootstrap 2.x that makes it easy to create simple, beautiful tag inputs.
https://github.com/fdeschenes/bootstrap-tag
Last synced: about 2 months ago
JSON representation
A javascript plugin for Twitter Bootstrap 2.x that makes it easy to create simple, beautiful tag inputs.
- Host: GitHub
- URL: https://github.com/fdeschenes/bootstrap-tag
- Owner: fdeschenes
- Archived: true
- Created: 2012-12-11T16:33:03.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-09-06T18:13:16.000Z (about 11 years ago)
- Last Synced: 2024-05-03T01:20:24.211Z (5 months ago)
- Language: JavaScript
- Homepage:
- Size: 152 KB
- Stars: 75
- Watchers: 7
- Forks: 39
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tags for Twitter Bootstrap 2.x
bootstrap-tag is a javascript plugin that makes it easy to create simple, beautiful tag inputs with the help of [Twitter Bootstrap](http://twitter.github.com/bootstrap/).
## Usage
Just like in Bootstrap you can activate it without any JavaScript, just by adding a data-attribute, you can make it automatically work.
Simply add `data-provide="tag"`. You can set options via data-attributes, too.
Alternatively, you can initialize via JavaScript:$('.input-tag').tag(options);
### Options
* **caseInsensitive** _(optional)_ Whether or not search and matching should be case insensitive. Default to `true`.
* **allowDuplicates** _(optional)_ Whether or not to allow duplicate tags. Defaults to `false`.
* **source** _(optional)_ The data source to query against. May be an array of strings or a function. Defaults to `[]`.
* **autocompleteOnComma** _(optional)_ Autocomplete on comma type with the first suggested value (if any). Default to `false`. Thank you, [knightq](https://github.com/knightq)!### Events
* **added** Triggered immediately after a tag is successfully added. The event handler will be passed the value that was added.
* **removed** Triggered immediately after a tag is successfully removed. The event handler will be passed the value that was removed.## Example
You can try it [here](http://fdeschenes.github.com/bootstrap-tag/). I've also included the example in the `docs` folder.