Skip to content

k-ivan/Tags

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 

Tags

Custom field for entering tags in the form.

How to use

Add tags.min.css file in your document's head

<link rel="stylesheet" href="tags.min.css">

Add tags.min.js file in your page at the bottom of the body

<script src="tags.min.js"></script>

Plugin initialization

var tags = new Tags('#tagged'); // <input id="tagged">

API Methods

Available public methods after initialization

  • .getTags() return a list of all tags in the field
  • .addTags('string' || [array] ) You can add a single tag or array tag
  • .clearTags() clear the field tags
  • .destroy() destroy, if necessary

Example

var tags = new Tags('#tagged');
tags.addTags(['one', 'two', 'three']);
tags.getTags(); // return one,two,three

About

Custom field for entering tags in the form. Codepen -

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published