For the latest version and awesome documentation, please head over to:
http://loopj.com/jquery-tokeninput/
This is a jQuery plugin to allow users to select multiple items from a predefined list, using autocompletion as they type to find each item. You may have seen a similar type of text entry when filling in the recipients field sending messages on facebook.
Vertical list style item selection
Facebook style item selection
A live demo of the token input is available here.
Latest documentation can be found here:
http://loopj.com/jquery-tokeninput/
Make sure you script outputs JSON search results in the following format:
[{"id":"856","name":"House"},
{"id":"1035","name":"Desperate Housewives"},
{"id":"1048","name":"Dollhouse"},
{"id":"1113","name":"Full House"}
]
Turn text inputs into tokeninputs using jQuery and point them to your results script
<script type="text/javascript">
$(document).ready(function () {
$("#my-text-input").tokenInput("/url/to/your/script/");
});
</script>
This plugin is released under a dual license. You can choose either the GPL or MIT license depending on the project you are using it in and how you wish to use it.
Please don’t use these links directly in your scripts, I might change their location at any time. Instead, download them and use your own local copy.
If you would like to contribute to this plugin, check out the github repository here: http://github.com/loopj/jquery-tokeninput
James Smith, British entrepreneur and developer based in San Francisco.
I'm the co-founder of Bugsnag with Simon Maynard, and from 2009 to 2012 I led up the product team as CTO of Heyzap.