You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+13-10Lines changed: 13 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ The standard jquery.autocomplete.js file is around 2.7KB when minified via Closu
15
15
*`serviceUrl`: Server side URL that provides results for suggestions. Optional if local lookup data is provided.
16
16
*`lookup`: Lookup array for the suggestions. It may be array of strings or `suggestion` object literals.
17
17
*`suggestion`: An object literal with the following format: `{ value: 'string', data: any }`.
18
-
* `lookupFilter`: `function (suggestion, query, queryLowerCase) {}` filter function for local lookups. By default it does partial string match (case insensitive).
18
+
*`lookupFilter`: `function (suggestion, query, queryLowerCase) {}` filter function for local lookups. By default it does partial string match (case insensitive).
19
19
*`onSelect`: `function (suggestion) {}` Callback function invoked when user selects suggestion
20
20
from the list. `this` inside callback refers to input HtmlElement.
21
21
*`minChars`: Minimum number of characters required to trigger autosuggest. Default: `1`.
@@ -34,10 +34,10 @@ The standard jquery.autocomplete.js file is around 2.7KB when minified via Closu
34
34
*`onSearchComplete`: `function (query) {}` called after ajax response is processed. `this` is bound to input element.
35
35
*`tabDisabled`: Default `false`. Set to true to leave the cursor in the input field after the user tabs to select a suggestion.
36
36
*`paramName`: Default `query`. The name of the request parameter that contains the query.
37
-
* `transformResult`: `function(response) {}` called after the result of the query is ready. Converts the result into response.suggestions format.
38
-
* `autoSelectFirst`: if set to `true`, first item will be selected when showing suggestions. Default value `false`.
39
-
* `appendTo`: container where suggestions will be appended. Default value `body`. Can be jQuery object, selector or html element. Make sure to set `position: absolute` or `position: relative` for that element.
40
-
* `dataType`: type of data returned from server. Either 'text' (default) or 'jsonp', which will cause the autocomplete to use jsonp. You may return a json object in your callback when using jsonp.
37
+
*`transformResult`: `function(response, originalQuery) {}` called after the result of the query is ready. Converts the result into response.suggestions format.
38
+
*`autoSelectFirst`: if set to `true`, first item will be selected when showing suggestions. Default value `false`.
39
+
*`appendTo`: container where suggestions will be appended. Default value `body`. Can be jQuery object, selector or html element. Make sure to set `position: absolute` or `position: relative` for that element.
40
+
*`dataType`: type of data returned from server. Either 'text' (default) or 'jsonp', which will cause the autocomplete to use jsonp. You may return a json object in your callback when using jsonp.
41
41
42
42
##Usage
43
43
@@ -115,13 +115,16 @@ you can supply the "paramName" and "transformResult" options:
0 commit comments