Auto Complete 3.2 Options

'ajax.php'
ajax - String

URL of the server side script.

50
cacheLimit - Integer

Limit's the number of entries stored in cache.

100
delay - Integer

Time delay of when to send the ajax requests in milliseconds.

'auto-complete-list'
list - String

CSS Class that will be attached to the UL created.

0
maxRequests - Integer

Maximum number of ajax requests allowed within a scripts duration. If 0, no limit is applied

1
minChars - Integer

Minimum number of required characters to send server side.

{}
postData - Object

Parameters that get passed to the server. The value defined by postVar will be overridden by the users input.

'value'
postVar - String

Name of the users input as it gets posted to the server.

false
preventEnterSubmit - Boolean

Prevents form submission when user selects a value from the UL drop down list using the enter key.

'auto-complete-list-rollover'
rollover - String

CSS Class toggled on li elements when mouseover or up/down events occur.

true
useCache - Boolean

Tells autoComplete whether or not to use script level caching.

Input Width
width - Float

Width of the UL drop down list. Default's to the width of the Input field

Events

Note*: The this object references the input field currently in focus.

Empty Function
onBlur - Function(val, $ul)

Callback function when the user loses focus on the input field. Has a 150 millisecond delay.

Empty Function
onFocus - Function($ul)

Callback function when the user focuses on the input field.

Empty Function
onMaxRequest - Function(val, $ul)

Callback function when maximum number of ajax requests is reached. Will only fire if maxRequests is not 0.

Empty Function
onSelect - Function(data, $li, $ul)

Callback function when the user selects an option from the UL drop down list.

Empty Function
onRollover - Function(data, $li, $ul)

Callback function when the user highlights one of the options of the UL drop down list.

Triggers

With version 3.2, you may trigger the autoComplete function and change the internal settings during the process. To do this, call the normal autoComplete function using the selector of the input needed, and pass the new settings that you would like applied, along with a keyCode of your choice (or -1). Ex:
	$('selector of input').autoComplete({...New Options...}, -1);

{}
options - Object

List of options to be extending into that input's settings. Same as the initial settings that were passed, only these will override those settings.

undefined
keyCode - Number

Key code to be passed with the keyup event trigger. You can find a list of key codes here, or just use -1.

undefined
stick - Boolean

Prevents old settings from being re-applied and overriding options passed with trigger

undefined
nofire - Boolean

Prevents keyup event from completing it's functionality. Useful for changing a few options on the fly without firing off the drop down list.