Skip to content

A javascript plugin for Twitter Bootstrap 2.x that makes it easy to create simple, beautiful tag inputs.

Notifications You must be signed in to change notification settings

lstachowiak/bootstrap-tag

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tags for Twitter Bootstrap 2.x

bootstrap-tag is a javascript plugin that makes it easy to create simple, beautiful tag inputs with the help of Twitter Bootstrap.

Usage

Just like in Bootstrap you can activate it without any JavaScript, just by adding a data-attribute, you can make it automatically work.

Simply add data-provide="tag". You can set options via data-attributes, too.

<input class="input-tag" type="text" name="tags" data-provide="tag">

Alternatively, you can initialize via JavaScript:

$('.input-tag').tag(options);

Options

  • caseInsensitive (optional) Whether or not search and matching should be case insensitive. Default to true.
  • allowDuplicates (optional) Whether or not to allow duplicate tags. Defaults to false.
  • source (optional) The data source to query against. May be an array of strings or a function. Defaults to [].

Events

  • added Triggered immediately after a tag is successfully added. The event handler will be passed the value that was added.
  • removed Triggered immediately after a tag is successfully removed. The event handler will be passed the value that was removed.

Example

You can try it here. I've also included the example in the docs folder.

About

A javascript plugin for Twitter Bootstrap 2.x that makes it easy to create simple, beautiful tag inputs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%