diff --git a/README.md b/README.md index 963e1ecc..11d4c0bf 100644 --- a/README.md +++ b/README.md @@ -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: +
$("#element").tokenInput(
function(query, response) {
$.ajax({ url: "your url here",
@@ -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) }
});
+
+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).