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
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,16 +23,16 @@ The standard jquery.autocomplete.js file is around 13KB when minified.
23
23
*`dataType`: type of data returned from server. Either `text` (default), `json` or `jsonp`, which will cause the autocomplete to use jsonp. You may return a json object in your callback when using jsonp.
24
24
*`paramName`: Default `query`. The name of the request parameter that contains the query.
25
25
*`params`: Additional parameters to pass with the request, optional.
26
-
*`deferRequestBy`: Number of miliseconds to defer ajax request. Default: `0`.
26
+
*`deferRequestBy`: Number of miliseconds to defer Ajax request. Default: `0`.
27
27
*`ajaxSettings`: Any additional [Ajax Settings](http://api.jquery.com/jquery.ajax/#jQuery-ajax-settings) that configure the jQuery Ajax request.
28
28
29
29
###Configuration Settings
30
30
*`noCache`: Boolean value indicating whether to cache suggestion results. Default `false`.
31
31
*`delimiter`: String or RegExp, that splits input value and takes last part to as query for suggestions.
32
32
Useful when for example you need to fill list of coma separated values.
33
-
*`onSearchStart`: `function (query) {}` called before ajax request. `this` is bound to input element.
34
-
*`onSearchComplete`: `function (query, suggestions) {}` called after ajax response is processed. `this` is bound to input element. `suggestions` is an array containing the results.
35
-
*`onSearchError`: `function (query, jqXHR, textStatus, errorThrown) {}` called if ajax request fails. `this` is bound to input element.
33
+
*`onSearchStart`: `function (query) {}` called before Ajax request. `this` is bound to input element.
34
+
*`onSearchComplete`: `function (query, suggestions) {}` called after Ajax response is processed. `this` is bound to input element. `suggestions` is an array containing the results.
35
+
*`onSearchError`: `function (query, jqXHR, textStatus, errorThrown) {}` called if Ajax request fails. `this` is bound to input element.
36
36
*`transformResult`: `function(response, originalQuery) {}` called after the result of the query is ready. Converts the result into response.suggestions format.
37
37
*`onSelect`: `function (suggestion) {}` Callback function invoked when user selects suggestion
38
38
from the list. `this` inside callback refers to input HtmlElement.
@@ -42,7 +42,7 @@ The standard jquery.autocomplete.js file is around 13KB when minified.
42
42
*`suggestion`: An object literal with the following format: `{ value: 'string', data: any }`.
43
43
*`lookupFilter`: `function (suggestion, query, queryLowerCase) {}` filter function for local lookups. By default it does partial string match (case insensitive).
44
44
*`triggerSelectOnValidInput`: Boolean value indicating if `select` should be triggered if it matches suggestion. Default `true`.
45
-
*`preventBadQueries`: Boolean value indicating if it shoud prevent future ajax requests for queries with the same root if no results were returned. E.g. if `Jam` returns no suggestions, it will not fire for any future query that starts with `Jam`. Default `true`.
45
+
*`preventBadQueries`: Boolean value indicating if it should prevent future Ajax requests for queries with the same root if no results were returned. E.g. if `Jam` returns no suggestions, it will not fire for any future query that starts with `Jam`. Default `true`.
46
46
*`autoSelectFirst`: if set to `true`, first item will be selected when showing suggestions. Default value `false`.
47
47
*`onHide`: `function (container) {}` called before container will be hidden
48
48
@@ -54,7 +54,7 @@ The standard jquery.autocomplete.js file is around 13KB when minified.
54
54
*`maxHeight`: Maximum height of the suggestions container in pixels. Default: `300`.
55
55
*`width`: Suggestions container width in pixels, e.g.: 300. Default: `auto`, takes input field width.
56
56
*`zIndex`: 'z-index' for suggestions container. Default: `9999`.
57
-
*`appendTo`: container where suggestions will be appended. Default value `document.body`. Can be jQuery object, selector or html element. Make sure to set `position: absolute` or `position: relative` for that element.
57
+
*`appendTo`: container where suggestions will be appended. Default value `document.body`. Can be jQuery object, selector or HTML element. Make sure to set `position: absolute` or `position: relative` for that element.
58
58
*`forceFixPosition`: Default: `false`. Suggestions are automatically positioned when their container is appended to body (look at `appendTo` option), in other cases suggestions are rendered but no positioning is applied.
59
59
Set this option to force auto positioning in other cases.
60
60
*`orientation`: Default `bottom`. Vertical orientation of the displayed suggestions, available values are `auto`, `top`, `bottom`.
@@ -70,7 +70,7 @@ The standard jquery.autocomplete.js file is around 13KB when minified.
70
70
Autocomplete instance has following methods:
71
71
72
72
*`setOptions(options)`: you may update any option at any time. Options are listed above.
73
-
*`clear`: clears suggestion cache and current suggestions suggestions.
73
+
*`clear`: clears suggestion cache and current suggestions.
74
74
*`clearCache`: clears suggestion cache.
75
75
*`disable`: deactivate autocomplete.
76
76
*`enable`: activates autocomplete if it was deactivated before.
0 commit comments