1- # jQuery Tags Input Plugin
1+ # jQuery Tags Input Plugin
22
3- Do you use tags to organize content on your site?
4- This plugin will turn your boring tag list into a
5- magical input that turns each tag into a style-able
6- object with its own delete link. The plugin handles
7- all the data - your form just sees a comma-delimited
3+ Do you use tags to organize content on your site?
4+ This plugin will turn your boring tag list into a
5+ magical input that turns each tag into a style-able
6+ object with its own delete link. The plugin handles
7+ all the data - your form just sees a comma-delimited
88list of tags!
99
1010[ Get it from Github] ( https://github.com/xoxco/jQuery-Tags-Input )
@@ -23,8 +23,8 @@ First, add the Javascript and CSS files to your <head> tag:
2323 <script src="jquery.tagsinput.js"></script>
2424 <link rel="stylesheet" type="text/css" href="jquery.tagsinput.css" />
2525
26- Create a real input in your form that will contain a comma-separated list of
27- tags. You can put any default or existing tags in the value attribute, and
26+ Create a real input in your form that will contain a comma-separated list of
27+ tags. You can put any default or existing tags in the value attribute, and
2828they'll be handled properly.
2929
3030 <input name="tags" id="tags" value="foo,bar,baz" />
@@ -34,18 +34,18 @@ a list of tags.
3434
3535 $('#tags').tagsInput();
3636
37- If you want to use jQuery.autocomplete, you can pass in a parameter with the
37+ If you want to use jQuery.autocomplete, you can pass in a parameter with the
3838autocomplete url.
3939
4040 $('#tags').tagsInput({
4141 autocomplete_url:'http://myserver.com/api/autocomplete'
4242 });
4343
44- If you're using the bassistance jQuery.autocomplete, which takes extra
45- parameters, you can also send in options to the autocomplete plugin, as
44+ If you're using the bassistance jQuery.autocomplete, which takes extra
45+ parameters, you can also send in options to the autocomplete plugin, as
4646described here.
4747
48- $('#tags').tagsInput({
48+ $('#tags').tagsInput({
4949 autocomplete_url:'http://myserver.com/api/autocomplete',
5050 autocomplete:{selectFirst:true,width:'100px',autoFill:true}
5151 });
@@ -68,19 +68,19 @@ And you can check if a tag exists using tagExist()...
6868 if ($('#tags').tagExist('foo')) { ... }
6969
7070If additional functionality is required when a tag is added or removed, you may
71- specify callback functions via the onAddTag and onRemoveTag parameters. Both
71+ specify callback functions via the onAddTag and onRemoveTag parameters. Both
7272functions should accept a single tag as the parameter.
7373
74- If you do not want to provide a way to add tags, or you would prefer to provide
75- an alternate interface for adding tags to the box, you may pass an false into
76- the optional 'interactive' parameter. The tags will still be rendered as per
77- usual, and the addTag and removeTag functions will operate as expected.
74+ If you do not want to provide a way to add tags, or you would prefer to provide
75+ an alternate interface for adding tags to the box, you may pass an false into
76+ the optional 'interactive' parameter. The tags will still be rendered as per
77+ usual, and the addTag and removeTag functions will operate as expected.
7878
7979If you want a function to be called every time a tag is updated/deleted, set it
8080as the 'onChange' option.
8181
82- By default, if the cursor is immediately after a tag, hitting backspace will
83- delete that tag. If you want to override this, set the 'removeWithBackspace'
82+ By default, if the cursor is immediately after a tag, hitting backspace will
83+ delete that tag. If you want to override this, set the 'removeWithBackspace'
8484option to false.
8585
8686## Options
@@ -95,9 +95,9 @@ option to false.
9595 'onAddTag':callback_function,
9696 'onRemoveTag':callback_function,
9797 'onChange' : callback_function,
98- 'delimiter': [',',';'],
98+ 'delimiter': [',',';'], // Or a string with a single delimiter. Ex: ';'
9999 'removeWithBackspace' : true,
100100 'minChars' : 0,
101- 'maxChars' : 0, //if not provided there is no limit
101+ 'maxChars' : 0, // if not provided there is no limit
102102 'placeholderColor' : '#666666'
103103 });
0 commit comments