jquery AutoComplete parameter Description

Source: Internet
Author: User

Minchars (number)
The minimum number of characters a user needs to enter before triggering autocomplete. Default:1, if set to 0, double-click inside the input box or delete the contents of the input box to display the list
Width (number)
Specifies the width of the drop-down box. The width of the default:input element
Max (number)
AutoComplete drop-down displays the number of items. default:10
Delay (number)
The delay (in milliseconds) of activating the AutoComplete after the keystroke. Default: Remote is 400 local 10
AutoFill (Boolean)
Do you want to automatically populate the input box with the value of the user's current mouse when the user chooses. Default:false
Mustmatch (Booolean)
If set to True,autocomplete only allows matching results to appear in the input box, all users will not get a drop-down box when they enter an illegal character. Default:false
Matchcontains (Boolean)
Determines whether a match is to be viewed inside the string when comparing, such as whether BA matches the BA in Foo Bar. It is important to use the cache. Don't mix with autofill. Default:false
Selectfirst (Boolean)
If set to True, the first value of the AutoComplete drop-down list is automatically selected when the user types the tab or return key, although it is not manually selected (with a keyboard or mouse). Of course, if the user selects an item, the user selects the value. Default:true
Cachelength (number)
The length of the cache. That is, the number of records to cache for the result set taken from the database. Set to 1 is not cached. default:10
Matchsubset (Boolean)
AutoComplete can use a cache of server queries, if the query results for Foo are cached, then if the user enters Foo there is no need to retrieve it. Use caching directly. This option is typically turned on to reduce the burden on the server to improve performance. Only valid if the cache length is greater than 1 o'clock. Default:true
MatchCase (Boolean)
Compares whether the case sensitive switch is turned on. It is important to use the cache. If you understand the previous option, this is not difficult to understand, like Foot to Foo in the cache to find. default:false
Multiple (Boolean)
Allows multiple values to be entered, using AutoComplete multiple times to enter multiple values. Default:false
Multipleseparator (String)
If multi-select, use to separate the characters of each selection. Default: ","
Scroll (Boolean)
Whether to use the reel display when the result set is greater than the default height default:true
ScrollHeight (number)
The reel height of the AutoComplete hint is expressed in pixel size default:180
Formatitem (Function)
Use advanced labels for each item you want to display. This function is called for each row in the result, and the return value is displayed in the drop-down list with the LI element inclusion. The autocompleter will provide three parameters (row, I, max): The returned array of results, the number of rows currently being processed (i.e., the number of items, which are the natural numbers starting at 1), and the number of elements in the current result array. Default:none, which indicates that a custom handler function is not specified so that each row in the drop-down list contains only one value.
FormatResult (Function)
Similar to Formatitem, but it is possible to format the values that will be entered into the input text box. There are also three parameters, like Formatitem. Default:none, which indicates either only data, or values provided with Formatitem.
Formatmatch (Function)
Use this function for each row of data to format the data that you want to query. The return value is used for the internal search algorithm. Parameter value row
Extraparams (Object)
provides additional parameters for the background (typically a server-side script). As is the case with a key-value pair object. If the passed value is {bar:4}, it will be parsed by Autocompleter into my_autocomplete_backend.php?q= Foo&bar=4 (assuming that the current user has entered Foo). Default: {}
Result (Handler)
This event is triggered when a user selects an item, with the following parameters:
Event: Events object. Event.type is the result.
Data: The selected rows.
The value returned by the Formatted:formatresult function
For example:
$ ("#singleBirdRemote"). Result (function (event, data, formatted) {
Assign values to other controls after selection, triggering other events, etc.
});

jquery AutoComplete parameter Description

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.