December 2013
Intermediate to advanced
384 pages
9h 54m
English
. . . jQuery . . . $( "#autocomplete" ).autocomplete({ source: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"] }); . . . HTML . . . <input id="autocomplete">
The autocomplete widget is attached to text input elements. As the user types in the text input, suggestions from a list are displayed. This is especially helpful when you have a finite set of possibilities that can be typed in and you want to make sure the correct spelling is used.
To apply the autocomplete widget, define a source array that contains the strings available to autocomplete in the text input. Then call the .autoComplete({source:array}) method on the input element. For example:
Read now
Unlock full access