Skip to content

Commit

Permalink
Updated README to explain changes and to note conflicts with upstream…
Browse files Browse the repository at this point in the history
… version.
  • Loading branch information
arrbee committed Jul 29, 2011
1 parent d653b36 commit 3b002a7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ Tokeninput is a jQuery plugin which allows your users to select multiple items f
Changes from original jquery-tokeninput
---------------------------------------

This is a forked version of jquery-tokeninput blending the latest versions of 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.
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.

In this version, in addition to having all of the latest features of both loopj's 1.5 version and 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:
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:

<pre><code>
$("#element").tokenInput(
function(query, response) {
$.ajax({ url: "your url here",
Expand All @@ -24,5 +25,7 @@ In this version, in addition to having all of the latest features of both loopj'
preventDuplicates: true,
onAdd: function(list,item) { alert("You added " + item.name) }
});
</code></pre>

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).

0 comments on commit 3b002a7

Please sign in to comment.