在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:xoxco/jQuery-Tags-Input开源软件地址:https://github.com/xoxco/jQuery-Tags-Input开源编程语言:JavaScript 79.2%开源软件介绍:jQuery Tags Input PluginDo you use tags to organize content on your site? This plugin will turn your boring tag list into a magical input that turns each tag into a style-able object with its own delete link. The plugin handles all the data - your form just sees a comma-delimited list of tags! Test it yourself using this jsFiddle Demo Created by XOXCO InstructionsFirst, add the Javascript and CSS files to your tag:
Create a real input in your form that will contain a comma-separated list of tags. You can put any default or existing tags in the value attribute, and they'll be handled properly.
Then, simply call the tagsInput function on any field that should be treated as a list of tags.
If you want to use jQuery.autocomplete, you can pass in a parameter with the autocomplete url.
If you're using the bassistance jQuery.autocomplete, which takes extra parameters, you can also send in options to the autocomplete plugin, as described here.
You can add and remove tags by calling the addTag() and removeTag() functions.
You can import a list of tags using the importTags() function...
You can also use importTags() to reset the tag list...
And you can check if a tag exists using tagExist()...
If additional functionality is required when a tag is added or removed, you may specify callback functions via the onAddTag and onRemoveTag parameters. Both functions should accept a single tag as the parameter. If you do not want to provide a way to add tags, or you would prefer to provide an alternate interface for adding tags to the box, you may pass an false into the optional 'interactive' parameter. The tags will still be rendered as per usual, and the addTag and removeTag functions will operate as expected. If you want a function to be called every time a tag is updated/deleted, set it as the 'onChange' option. By default, if the cursor is immediately after a tag, hitting backspace will delete that tag. If you want to override this, set the 'removeWithBackspace' option to false. Options
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论