11.4.3. Autocomplete events

During an autocomplete operation, a number of custom events are triggered, not only to inform us of what’s going on, but to give us a chance to cancel certain aspects of the operation.

As with other jQuery UI custom events, two parameters are passed to the event handlers: the event and a custom object. This custom object is empty except for auto-completefocus, autocompletechange, and autocompleteselect events. For the focus, change, and select events, this object contains a single property named item, which in turn contains the properties label and value, representing the label and value of the focused or selected value. For all the event handlers, the function context (this) is set to the <input> element.

Table ...

Get jQuery in Action, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.