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({
results(term, page)+
results(data, page)
Parameter | Type | Description |
---|---|---|
term | string | Search term |
data | object | Retrieved data |
page | int | Page number that was passed into the data function above |
<returns> | object | Results object. See "options.callback" in the "query" function for format. |