Style tag system in jquery

I am wondering if there is a pre-generated clone (or a very similar one) with an overflow stack tag system.

I did some googling but can't find any jquery resource.

+4
source share
2 answers

As a result, I created my own implementation:

http://webspirited.com/tagit/index.php?themeroller=true#demo8

+3
source

Here is my implementation (which, I think, is more true for the SO style than the accepted answer). The style may need to be customized, but it is functionally the same as you see on SO.

Features:

  • It accepts a predefined input field with words separated by commas - ideal for all cases, such as those in which you are editing an element that already has tags, and creates an interactive tag editor from this information.

    example in rails format:

    <input id="post_tag_list" name="post[tag_list]" value='testing, test, probably, goose, under_score'/> 
  • Updates the hidden input field when the user edits tags so that all the necessary tags are in the submitted form.

  • Deleting back through the input field of tags (false) functionally coincides with deleting one long line of words, making editing more natural.

  • To edit, click on the tags.

  • Commas, spaces, returns, and tabs close the open tag that is being edited or created.

  • The close button on tags functions as expected.

  • and etc.

Find it here: http://jsfiddle.net/bradleygriffith/axjKm/

+5
source

Source: https://habr.com/ru/post/1338016/


All Articles