Fork of hailwood/jQuery-Tagit
Install with npm:
npm install jquery-tagit
Active Development?
This plugin is no longer under active development, I will continue to merge in pull requests as long as they conform to the Note for contributers/pull requesters below, but do not have the time to activly develop the plugin. If someone wishes to take over the plugin create an issue in the tracker and I will discuss with you there. For anyone looking to use this plugin I strongly suggest checkout out the awesome Select2 by Igor Vaynberg. Which has all the features of Tagit and then some!
Note for contributors/pull requesters
We welcome all bug fixes and additions to tagit, it is a community project after all, however we have one rule for commits:
- All edits must be applied to both tagit.js and tagit-themeroller.js no pull requests will be accepted unless this is done to ensure the scripts function equally.
It depends on [jQuery 1.7.2](http://jquery.com). and [jQuery-ui 1.8](http://jqueryui.com) The _jQuery Tagit Plugin_ transforms an html unordered list into a unique tagging plugin.
Why unique? Because jQuery Tagit uses jQuery UI's auto-complete plugin to supply suggestions to users as they type and has some awesome features like sortable tags.
Quicklinks
Features
- Convenient way for users to enter a list of items
- Fully integrated with jQuery ui auto complete
- Automatically adds current input as tag if input loses focus
- Easy to use public methods
- Easy to theme (single css file)
- Customizable trigger keys
- Backspace on empty input deletes previous tag
- Ability to provide initial tags on creation though options
- Ability to provide initial tags on creation via list items
- Option to toggle usage of a hidden select so the tags can be sent using a normal form!
- Ability to re-arrange tags by drag and drop!
- Optional ThemeRoller compatibility!
- Fully HTML5 Data-attributes compliant!
Options
| Name | Type | Default | Note |
|---|---|---|---|
| tagSource | String, Array, Callback | [] | This option maps directly to the jQuery UI Autocomplete source option |
Methods
| Name | Return | Note |
|---|---|---|
.tagit("destroy") |
null | Returns the ul to its original state |
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License with original attribution remaining with Matthew Hailwood and http://jquery.webspirited.com.