From 671635449d9d35dfba0a431f30ea8647b844cbc0 Mon Sep 17 00:00:00 2001 From: Igor Vaynberg Date: Fri, 13 Apr 2012 11:30:13 -0700 Subject: [PATCH] fixed up docs, closes #31 --- index.html | 10 +++++----- select2-master | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index cc63d810..dc7a0e0c 100755 --- a/index.html +++ b/index.html @@ -129,12 +129,12 @@ $("#e6").select2({ dataType: 'jsonp', data: function (term, page) { return { - q: term, + q: term, // search term page_limit: 10, apikey: "ju6z9mjyajq2djue3gbvv26t" // please do not use so this example keeps working }; }, - results: function (data, vars) { // parse the results into the format expected by Select2. + results: function (data, page) { // parse the results into the format expected by Select2. // since we are using custom formatting functions we do not need to alter remote JSON data return {results: data.movies}; } @@ -156,7 +156,7 @@ $("#e7").select2({ quietMillis: 100, data: function (term, page) { // page is the one-based page number tracked by Select2 return { - q: term, + q: term, //search term page_limit: 10, // page size page: page, // page number apikey: "ju6z9mjyajq2djue3gbvv26t" // please do not use so this example keeps working @@ -876,10 +876,10 @@ $("#tags").select2({ resultsfunction Function used to build the query results object from the ajax response -
results(term, page)
+
results(data, page)
- +
ParameterTypeDescription
termstringSearch term
dataobjectRetrieved data
pageintPage number that was passed into the data function above
<returns>objectResults object. See "options.callback" in the "query" function for format.
diff --git a/select2-master b/select2-master index 120aff95..7bd71395 160000 --- a/select2-master +++ b/select2-master @@ -1 +1 @@ -Subproject commit 120aff9582f58d461675daadabea00fe9935ea54 +Subproject commit 7bd7139563892e7478de2e334ed15881967feed0