fixed up docs, closes #31
This commit is contained in:
parent
ac5b10779e
commit
671635449d
10
index.html
10
index.html
@ -129,12 +129,12 @@ $("#e6").select2({
|
|||||||
dataType: 'jsonp',
|
dataType: 'jsonp',
|
||||||
data: function (term, page) {
|
data: function (term, page) {
|
||||||
return {
|
return {
|
||||||
q: term,
|
q: term, // search term
|
||||||
page_limit: 10,
|
page_limit: 10,
|
||||||
apikey: "ju6z9mjyajq2djue3gbvv26t" // please do not use so this example keeps working
|
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
|
// since we are using custom formatting functions we do not need to alter remote JSON data
|
||||||
return {results: data.movies};
|
return {results: data.movies};
|
||||||
}
|
}
|
||||||
@ -156,7 +156,7 @@ $("#e7").select2({
|
|||||||
quietMillis: 100,
|
quietMillis: 100,
|
||||||
data: function (term, page) { // page is the one-based page number tracked by Select2
|
data: function (term, page) { // page is the one-based page number tracked by Select2
|
||||||
return {
|
return {
|
||||||
q: term,
|
q: term, //search term
|
||||||
page_limit: 10, // page size
|
page_limit: 10, // page size
|
||||||
page: page, // page number
|
page: page, // page number
|
||||||
apikey: "ju6z9mjyajq2djue3gbvv26t" // please do not use so this example keeps working
|
apikey: "ju6z9mjyajq2djue3gbvv26t" // please do not use so this example keeps working
|
||||||
@ -876,10 +876,10 @@ $("#tags").select2({
|
|||||||
</td></tr>
|
</td></tr>
|
||||||
<tr><td>results</td><td>function</td><td>
|
<tr><td>results</td><td>function</td><td>
|
||||||
Function used to build the query results object from the ajax response
|
Function used to build the query results object from the ajax response
|
||||||
<pre>results(term, page)</pre>
|
<pre>results(data, page)</pre>
|
||||||
<table class="table table-bordered table-striped">
|
<table class="table table-bordered table-striped">
|
||||||
<tr><th>Parameter</th><th>Type</th><th>Description</th></tr>
|
<tr><th>Parameter</th><th>Type</th><th>Description</th></tr>
|
||||||
<tr><td>term</td><td>string</td><td>Search term</td></tr>
|
<tr><td>data</td><td>object</td><td>Retrieved data</td></tr>
|
||||||
<tr><td>page</td><td>int</td><td>Page number that was passed into the <code>data</code> function above</td></tr>
|
<tr><td>page</td><td>int</td><td>Page number that was passed into the <code>data</code> function above</td></tr>
|
||||||
<tr><td><returns></td><td>object</td><td>Results object. See "options.callback" in the "query" function for format.</td></tr>
|
<tr><td><returns></td><td>object</td><td>Results object. See "options.callback" in the "query" function for format.</td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 120aff9582f58d461675daadabea00fe9935ea54
|
Subproject commit 7bd7139563892e7478de2e334ed15881967feed0
|
Loading…
Reference in New Issue
Block a user