├── .gitignore ├── README.md ├── credits-before-gh.txt ├── css ├── tagit-awesome-blue.css ├── tagit-awesome-orange.css ├── tagit-dark-grey.css ├── tagit-simple-blue.css ├── tagit-simple-green.css ├── tagit-simple-grey.css ├── tagit-stylish-yellow.css ├── themeroller │ ├── aristo │ │ ├── Aristo.css │ │ └── images │ │ │ ├── bg_fallback.png │ │ │ ├── icon_sprite.png │ │ │ ├── progress_bar.gif │ │ │ ├── slider_handles.png │ │ │ ├── ui-icons_222222_256x240.png │ │ │ └── ui-icons_454545_256x240.png │ ├── bootstrap │ │ ├── Bootstrap.css │ │ └── images │ │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ │ ├── ui-bg_glass_75_ffffff_1x400.png │ │ │ ├── ui-bg_highlight-soft_75_cccccc_1x100.png │ │ │ ├── ui-bg_inset-soft_95_fef1ec_1x100.png │ │ │ ├── ui-icons_222222_256x240.png │ │ │ ├── ui-icons_2e83ff_256x240.png │ │ │ ├── ui-icons_454545_256x240.png │ │ │ ├── ui-icons_888888_256x240.png │ │ │ ├── ui-icons_cd0a0a_256x240.png │ │ │ └── ui-icons_f6cf3b_256x240.png │ └── tagit.css └── ui-anim_basic_16x16.gif ├── demo ├── css │ ├── demo.css │ ├── images │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ ├── ui-bg_highlight-soft_75_cccccc_1x100.png │ │ ├── ui-icons_222222_256x240.png │ │ ├── ui-icons_2e83ff_256x240.png │ │ ├── ui-icons_454545_256x240.png │ │ ├── ui-icons_888888_256x240.png │ │ └── ui-icons_cd0a0a_256x240.png │ ├── jquery-ui-base-1.8.20.css │ └── jquery-ui-base-1.8.20.css~ ├── images │ └── browsers │ │ ├── chrome.png │ │ ├── firefox.png │ │ ├── ie.png │ │ ├── opera.png │ │ └── safari.png ├── js │ ├── jquery-ui.1.8.20.min.js │ ├── jquery-ui.1.8.20.min.js~ │ └── jquery.1.7.2.min.js └── themeswitcher │ ├── images │ ├── buttonbg.png │ ├── icon_color_arrow.gif │ ├── menuhoverbg.png │ ├── theme_90_aristo.png │ ├── theme_90_black_matte.png │ ├── theme_90_black_tie.png │ ├── theme_90_blitzer.png │ ├── theme_90_cupertino.png │ ├── theme_90_dark_hive.png │ ├── theme_90_dot_luv.png │ ├── theme_90_eggplant.png │ ├── theme_90_excite_bike.png │ ├── theme_90_flick.png │ ├── theme_90_hot_sneaks.png │ ├── theme_90_humanity.png │ ├── theme_90_le_frog.png │ ├── theme_90_mint_choco.png │ ├── theme_90_overcast.png │ ├── theme_90_pepper_grinder.png │ ├── theme_90_smoothness.png │ ├── theme_90_south_street.png │ ├── theme_90_start_menu.png │ ├── theme_90_sunny.png │ ├── theme_90_swanky_purse.png │ ├── theme_90_trontastic.png │ ├── theme_90_ui_dark.png │ ├── theme_90_ui_light.png │ └── theme_90_windoze.png │ └── jquery.themeswitcher.js ├── docs.html ├── index.html ├── index.php ├── index.themeroller.html └── js ├── tagit-themeroller.js └── tagit.js /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Active Development? 2 | 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. 3 | For anyone looking to use this plugin I strongly suggest checkout out the awesome [Select2](http://ivaynberg.github.com/select2/) by [Igor Vaynberg](https://github.com/ivaynberg). Which has all the features of Tagit and then some! 4 | 5 | ## Note for contributors/pull requesters 6 | We welcome all bug fixes and additions to tagit, it is a community project after all, however we have one rule for commits: 7 | * 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. 8 | 9 |
Name | 40 |Type | 41 |Default | 42 |Note | 43 |
---|---|---|---|
tagSource | 48 |String, Array, Callback | 49 |[] | 50 |This option maps directly to the jQuery 51 | UI Autocomplete source option 52 | | 53 |
triggerKeys | 57 |Array | 58 |['enter', 'space', 'comma', 'tab'] | 59 |An array containing all or any of the default options. 60 | These are the keys that will trigger a tag completion 61 | |
62 |
allowNewTags | 66 |Bool | 67 |true | 68 |Allow tags that do not exist in tagSource to be entered? | 69 |
initialTags | 73 |Array | 74 |[] | 75 |An array containing tags to pre-populate the field with | 76 |
minLength | 80 |Int | 81 |1 | 82 |The minimum length before a triggerKey will create a tag | 83 |
maxLength | 87 |Int | 88 |1 | 89 |The maximum length a tag is allowed to be | 90 |
select | 94 |Bool | 95 |false | 96 |Maintain a hidden select in place for form submissions 97 | To name the select simply give your UL a name attribute! 98 | *** 99 | Don't forget 100 | to include [ and ] if your language (e.g. PHP) requires them! 101 | |
102 |
tagsChanged | 106 |Callback | 107 |function(tagValue, action, element) | 108 |Callback on changed tags: 109 | **tagValue:** string 110 | **action:** string - either 'added', 'popped', 'moved' or 'reset' 111 | **element:** object - reference to the added LI element 112 | | 113 |
caseSensitive | 117 |Bool | 118 |false | 119 |The check for existing tags is case sensitive. 120 | If false the words "Foo" and "foo" considered the same 121 | | 122 |
highlightOnExistColor | 126 |String | 127 |#0F0 | 128 |If the user tries to add a tag that already exists the existing 129 | tag will run a highlight effect using the defined background color. 130 | If null, the highlight effect is turned off. 131 | | 132 |
placeholder | 136 |String | 137 |Enter tags... | 138 |The placeholder of the tagit field. It can be any string. 139 | | 140 |
inputWidth | 144 |integer | 145 |150 | 146 |The length of the input. It can be adjusted based on the palceholder. 147 | | 148 |
maxTags | 152 |Int | 153 |unlimited | 154 |The maximum number of tags that the user can enter. 155 | If omitted, an unlimited number of tags are allowed. 156 | | 157 |
sortable | 161 |Bool, String | 162 |false | 163 |Allows the user to re-order the tags using drag and drop. 164 | If true the whole tag is dragable. 165 | If 'handle' a handle is rendered and the tag is only dragable using the handle. 166 | | 167 |
allowDuplicates | 171 |Bool | 172 |False | 173 |Allow Duplicate tags if set to true 174 | | 175 |
Name | 185 |Return | 186 |Note | 187 |
---|---|---|
.tagit("destroy") |
192 | null | 193 |Returns the ul to its original state | 194 |
.tagit("tags") |
198 | Array | 199 |Returns an array of objects about all the tags. | 200 |
.tagit("reset") |
204 | null | 205 |Resets the tags list to the initial value | 206 |
.tagit("fill", [{label: 'tag', value: 12}, {label: 'stuff', value: 13}]) |
210 | null | 211 |Empties the tags and fills the plugin with the provided tags. | 212 |
.tagit("add", {label: 'tag', value: 12}) |
216 | Bool | 217 |Adds a tag to the plugin. | 218 |
.tagit("remove", 'tag', 12) |
222 | Bool | 223 |Removes a tag by its label or value. | 224 |
Name | 109 |Type | 110 |Default | 111 |Note | 112 |
---|---|---|---|
tagSource | 117 |String, Array, Callback | 118 |[] | 119 |This option maps directly to the jQuery 120 | UI Autocomplete source option | 121 |
triggerKeys | 125 |Array | 126 |['enter', 'space', 'comma', 'tab'] | 127 |An array containing all or any of the default options. 128 | These are the keys that will trigger a tag completion 129 | |
130 |
allowNewTags | 134 |Bool | 135 |true | 136 |Allow tags that do not exist in tagSource to be entered? | 137 |
initialTags | 141 |Array | 142 |[] | 143 |An array containing tags to pre-populate the field with | 144 |
minLength | 148 |Int | 149 |1 | 150 |The minimum length before a triggerKey will create a tag | 151 |
select | 155 |Bool | 156 |false | 157 |Maintain a hidden select in place for form submissions 158 | To name the select simply give your UL a name attribute! 159 | 160 | Don't forget 161 | to include [ and ] if your language (e.g. PHP) requires them! 162 | |
163 |
tagsChanged | 167 |Callback | 168 |function(tagValue, action, element) | 169 |Callback on changed tags: 170 | tagValue: string 171 | action: string - either 'added', 'popped', 'moved' or 'reset' 172 | element: object - reference to the added LI element 173 | |
174 |
caseSensitive | 178 |Bool | 179 |false | 180 |181 | The check for existing tags is case sensitive. If false the words "Foo" and "foo" considered the same 182 | | 183 |
highlightOnExistColor | 187 |String | 188 |#0F0 | 189 |190 | If the user tries to add a tag, that already exists, the existing tag will run a highlight effect using 191 | the defined background color. 192 | If null, the highlight effect is turned off. 193 | | 194 |
maxLength | 198 |Int | 199 |unlimited | 200 |
201 | The maximum allowable length of a tag. 202 | If omitted, tags of unlimited length are allowed. 203 | |
204 |
maxTags | 208 |Int | 209 |unlimited | 210 |
211 | The maximum number of tags that the user can enter. 212 | If omitted, an unlimited number of tags are allowed. 213 | |
214 |
sortable | 218 |Bool, String | 219 |false | 220 |
221 | Allows the user to re-order the tags using drag and drop. 222 | If true the whole tag is draggable, if 'handle' a handle is 223 | rendered and the tag is only draggable using the handle. 224 | |
225 |
Name | 235 |Return | 236 |Note | 237 |
---|---|---|
.tagit("destroy") | 242 |null | 243 |Returns the ul to its original state | 244 |
.tagit("tags") | 248 |Array | 249 |Returns an array of objects about all the tags. | 250 |
.tagit("reset") | 254 |null | 255 |Resets the tags list to the initial value | 256 |
.tagit("fill", [{label: 'tag', value: 12}, {label: 'stuff', value: 13}]) | 260 |null | 261 |Empties the tags and fills the plugin with the provided tags. | 262 |
.tagit("add", {label: 'tag', value: 12}) | 266 |Bool | 267 |Adds a tag to the plugin. | 268 |
Action: 187 | 188 |
190 |
Maximum of 5 tags and 5 characters per tag.
204 |Action: 414 | 415 |
417 |
Maximum of 5 tags and 5 characters per tag.
431 |Action: 374 | 375 |
377 |
Maximum of 5 tags and 5 characters per tag.
391 |