2
0
mirror of https://github.com/devbridge/jQuery-Autocomplete.git synced 2024-11-22 12:55:12 +00:00

Updated readme

Readability changes
This commit is contained in:
oshihirii 2017-09-09 13:53:01 +10:00 committed by GitHub
parent aca25b9047
commit fa88402642

View File

@ -7,17 +7,16 @@ Devbridge Group accelerates software to market for enterprise clients through de
Ajax Autocomplete for jQuery allows you to easily create Ajax Autocomplete for jQuery allows you to easily create
autocomplete/autosuggest boxes for text input fields. autocomplete/autosuggest boxes for text input fields.
Has no dependencies other than jQuery. It has no dependencies other than jQuery.
The standard jquery.autocomplete.js file is around 13KB when minified. The standard jquery.autocomplete.js file is around 13KB when minified.
## API ## API
The following sets up autocomplete for input fields where `options` is an object literal that defines the settings to use for the autocomplete plugin. All available option settings are shown in the tables below.
* `$(selector).autocomplete(options);` ```js
* Sets up autocomplete for input field(s). $(selector).autocomplete(options);
* `options`: An object literal which defines the settings to use for the autocomplete plugin. Available option settings listed below. ```
### General settings (local and Ajax)
### General settings (for local and Ajax searches)
| Setting | Default | Description | | Setting | Default | Description |
| :--- | :--- | :--- | | :--- | :--- | :--- |
| `noCache` | `false` | Boolean value indicating whether to cache suggestion results | | `noCache` | `false` | Boolean value indicating whether to cache suggestion results |
@ -43,7 +42,7 @@ The standard jquery.autocomplete.js file is around 13KB when minified.
| `tabDisabled` | `false` | Set to true to leave the cursor in the input field after the user tabs to select a suggestion | | `tabDisabled` | `false` | Set to true to leave the cursor in the input field after the user tabs to select a suggestion |
### Event function settings (for local and Ajax searches) ### Event function settings (local and Ajax)
| Event setting | Function description | | Event setting | Function description |
| :--- | :--- | | :--- | :--- |
| `onSearchStart` | `function (params) {}` called before Ajax request. `this` is bound to input element | | `onSearchStart` | `function (params) {}` called before Ajax request. `this` is bound to input element |