Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 32 lines (24 sloc) 1.682 kb
82325bd @loopj Update readme and php example
loopj authored
1 jQuery Tokeninput: A Tokenizing Autocomplete Text Entry
2 =======================================================
009d388 @loopj Updated the README
loopj authored
3
4 Overview
5 --------
82325bd @loopj Update readme and php example
loopj authored
6 Tokeninput is a jQuery plugin which allows your 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.
009d388 @loopj Updated the README
loopj authored
7
b5e770a @vdepizzol updated README with list of changes changes from loopj version
vdepizzol authored
8 Changes from original jquery-tokeninput
9 ---------------------------------------
04a45d1 @loopj Fix link
loopj authored
10
3b002a7 @arrbee Updated README to explain changes and to note conflicts with upstream ve...
authored
11 This is a forked version of jquery-tokeninput blending vdepizzol's and loopj's versions, plus updating the search-by-function behavior to actually work and to be similar to JQuery UI Autocomplete's behavior.
b5e770a @vdepizzol updated README with list of changes changes from loopj version
vdepizzol authored
12
3b002a7 @arrbee Updated README to explain changes and to note conflicts with upstream ve...
authored
13 In this version, in addition to merging loopj's 1.5 version with vdepizzol's improvements, the main change is that in addition to providing a URL or inline data for the first parameter, you can provide a search function to handle the lookups for you. This function can construct whatever type of request you like, such as:
b5e770a @vdepizzol updated README with list of changes changes from loopj version
vdepizzol authored
14
3b002a7 @arrbee Updated README to explain changes and to note conflicts with upstream ve...
authored
15 <pre><code>
aaa32ec @arrbee Updated README.md to explain my changes
authored
16 $("#element").tokenInput(
17 function(query, response) {
18 $.ajax({ url: "your url here",
19 data: { q: query, extra: "stuff" },
20 dataType: "json",
21 success: function(data) { response(data) }
22 });
6518a4a @vdepizzol finish example of custom objects as data source
vdepizzol authored
23 },
aaa32ec @arrbee Updated README.md to explain my changes
authored
24 {
25 preventDuplicates: true,
26 onAdd: function(list,item) { alert("You added " + item.name) }
27 });
3b002a7 @arrbee Updated README to explain changes and to note conflicts with upstream ve...
authored
28 </code></pre>
b5e770a @vdepizzol updated README with list of changes changes from loopj version
vdepizzol authored
29
3b002a7 @arrbee Updated README to explain changes and to note conflicts with upstream ve...
authored
30 These changes are somewhat incompatible with the latest merges to the head of loopj's tree where a patch was accepted to have just a simple URL formatter function (instead of the "perform the search for you" function that I wrote a la JQuery UI Autocomplete).
b5e770a @vdepizzol updated README with list of changes changes from loopj version
vdepizzol authored
31
Something went wrong with that request. Please try again.