Questions tagged [jquery-ui-autocomplete]

Autocomplete widget from jQuery-ui which enables users to quickly find and select from a pre-populated list of values as they type, leveraging searching and filtering.

The jQuery UI autocomplete widget, when added to an input field, enables users to quickly find and select from a pre-populated list of values as they type, leveraging searching and filtering.

Autocomplete can be customized to work with various data sources, by just specifying the source option. A data source can be:

Autocomplete is extremely flexible, allowing for highly-customized usage. Some more advanced examples include:

  • Tag picker (providing multiple values)
  • Combobox (autocomplete with select element as backing store)

References

Helpful Questions

2118 questions
285
votes
17 answers

twitter bootstrap typeahead ajax example

I'm trying to find a working example of the twitter bootstrap typeahead element that will make an ajax call to populate it's dropdown. I have an existing working jquery autocomplete example which defines the ajax url to and how to process the…
168
votes
13 answers

How can I custom-format the Autocomplete plug-in results?

I’m using the jQuery UI Autocomplete plug-in. Is there a way to highlight search character sequence in drop-down results? For example, if I have “foo bar” as data and I type "foo" I’ll get “foo bar” in the drop-down, like this:
dev.e.loper
  • 35,446
  • 76
  • 161
  • 247
138
votes
15 answers

Limit results in jQuery UI Autocomplete

I am using jQuery UI Autocomplete. $("#task").autocomplete({ max:10, minLength:3, source: myarray }); The max parameter doesn't work and I still get more than 10 results. Am I missing something?
santhosh
  • 1,894
  • 3
  • 18
  • 23
120
votes
5 answers

How to get jQuery dropdown value onchange event

I have added two jQuery UI Dropdown Autocomplete script. Now I want get both value onchange of second dropdown and want to store separately in variable. How it is possible? Any ideas or suggestions? Thanks. My Fiddle: Sample My JS Code: (function($)…
Rajnikanth
  • 2,745
  • 6
  • 31
  • 46
102
votes
6 answers

Clear form field after select for jQuery UI Autocomplete

I'm developing a form, and using jQuery UI Autocomplete. When the user selects an option, I want the selection to pop into a span appended to the parent

tag. Then I want the field to clear rather than be populated with the selection. I have…

Jon F Hancock
  • 3,349
  • 3
  • 23
  • 26
89
votes
6 answers

Detecting no results on jQuery UI autocomplete

Before you point me to them, yes, I have reviewed the half dozen posts on this topic, but I am still stymied as to why this doesn't work. My goal is to detect when the autocomplete yields 0 results. Here's the code: $.ajax({ …
ScottyDont
  • 1,207
  • 1
  • 9
  • 17
88
votes
3 answers

Autocomplete applying value not label to textbox

Im having troubles trying to get the autocomplete to work properly. It all looks ok to me but....