share
Stack OverflowWhat's a good AJAX Autocomplete Plugin for jQuery?
[+88] [11] Murat Ayfer
[2008-10-09 18:05:41]
[ javascript jquery ajax autocomplete jquery-autocomplete ]
[ http://stackoverflow.com/questions/188442/whats-a-good-ajax-autocomplete-plugin-for-jquery ] [DELETED]

I usually use jQuery as my JS library on my sites, and I would like to stick with it since I'm familiar with it.

I need to implement an AJAX autocomplete, mainly for suggesting search results. Here are a few I have found:

If you have tried any of these plugins, were you happy with them? Which one do you think is the most (and easily) customizable?

[+52] [2008-10-09 20:21:55] Joe Lencioni [ACCEPTED]

I was recently on a similar mission and I eventually settled with jQuery UI's autocomplete [1]. I am currently using jQuery UI 1.6rc2 and the autocomplete plugin is very well implemented and customizable. Here's an example:

<script type="text/javascript" src="jquery-1.2.6.js"></script>
<script type="text/javascript" src="ui.core.js"></script>
<script type="text/javascript" src="ui.autocomplete.js"></script>

<script type="text/javascript">
$('#search').autocomplete({
  url: 'suggestions.php', //jQuery UI 1.6rc2
  // source : 'suggestion.php', //jQuery UI 1.8.18
  width: 300,
  max: 10,
  delay: 100,
  cacheLength: 1,
  scroll: false,
  highlight: false
});
</script>
[1] http://docs.jquery.com/UI/Autocomplete

works great, very easy to read/modify the code too. thanks! - Murat Ayfer
how do you give it a function to execute when the user chooses a value from the autocomplete results? - Horace Loeb
Thanks for this. I didn't know that it's merged to jQuery UI now. - jpartogi
(2) "As of jQuery UI 1.7, the autocomplete plugin is not part of the stable release of jQuery UI." ...not anymore :( - Stephen J. Fuhry
(9) autocomplete is a part of jquery UI 1.8 again - Zeus
(1) Yes it is in the 1.8, but I seems to have problem when I try to have scroll bar (vertical) - Nordes
(1) also it has lost some options... too bad. - Mauricio
@Joe -- How i can get value in suggestions.php.... it in post or get? Can I have example code in php - Elankeeran
@Elankeeran, here is an excellent example net.tutsplus.com/tutorials/javascript-ajax/… - sumanchalki
1
[+28] [2009-04-14 17:45:31] Tomas Kirda
I've been using this plugin and it is very flexible and provides good functionality. - ChrisP
(1) Nice. I like the highlighting. I don't know what it is but the lack of bolding or highlighting of any sort from the jQuery UI AutoComplete simply bothers me. - Steve Wortham
After getting frustrated by jquery's native autocomplete and a few others I tried this and this one rocks. Super fast, simple and intuitive! - Sid
+1 a plugin just for autocomplete and does it well. I especially like the non standard results section: github.com/devbridge/… - John Magnolia
2
[+10] [2009-03-02 03:42:18] kimsk

Autocomplete has been removed from the latest JQuery UI (since 1.6rc3). And the one you found in 1.6rc2, won't work with later version.

However, this guys has modified the code and make it work with later version.

http://pastie.org/362706

http://osdir.com/ml/jquery-ui/2009-01/msg00002.html


(4) Why was it removed? - Mark
(1) I think because it wasn't being maintained. - Jess
3
[+10] [2010-05-07 13:36:00] Anthony Potts

As of jQuery UI 1.8.1, autocomplete is standard with the library.


4
[+6] [2009-09-21 06:12:46] Shyju

This is quite easy-simple to integrate .This has got a lot of options with it

http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/ http://jquery.bassistance.de/autocomplete/demo/


5
[+5] [2009-12-21 19:05:46] dyve

There's a rewrite of my autocomplete up on http://code.google.com/p/jquery-autocomplete/ (in an attempt to properly open source it). Please report any issues you find on the Google Code project.

That said, I fully endorse Jörn's excellent work on a jQuery UI autocomplete and his version will probably be more powerful/customizable eventually.

Dylan Verheul


6
[+5] [2012-01-26 10:07:00] iim.hlk

i like the smart coding of James Smith,

Features ::

  • one single .js file instead of lots ( jQuery Ui official plugin need four .js )
  • HIGHLY customizable
  • FRESH development

check http://loopj.com/jquery-tokeninput/


awesome, thanks - nguyên
7
[+3] [2008-10-09 20:28:45] Parand

I tried a number of them, ended up with YUI's autocomplete [1] (yes, for use with jQuery), it's worked well for me so far. You can use YUI's Loader [2] facility to make it a fairly painless download and keep page loading times good.

[1] http://developer.yahoo.com/yui/autocomplete/
[2] http://developer.yahoo.com/yui/yuiloader/

8
[+2] [2009-11-29 23:49:48] namespaceform

As of today, only Dylan Verheul's version [1] worked for me without issues.
I tried the others but I was going crazy juggling between xml and json data output formats from PHP.
Dylan's gives a simple plain text option (JSON and XML are not difficult, just that if plain text works, you might find it easy and useful).
The server side code for the example is tiny [2] if you ignore the data array.
I used the autocomplete.css from Jörn Zaefferer's version [3] with the source on Dylan's page ... works fine.

[1] http://dyve.net/jquery/?autocomplete
[2] http://dyve.net/jquery/search.phps
[3] http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/

I'd like to mention that the maintained version of this plugin now lives at code.google.com/p/jquery-autocomplete - dyve
9
[0] [2010-04-30 13:18:46] Wellington RIbeiro

You can find a simple autocomplete plugin on

http://blog.idealmind.com.br/projetos/simple-autocomplete-jquery-plugin/

It's a plug and play plugin with callback functions, and you can use multiple autocomplete on the same page.


10
[0] [2011-10-17 09:49:06] Sushil

This combobox has many useful option documentation [1] download [2].

[1] http://jscombobox.blogspot.com/2010/07/easy-javascript-combobox.html
[2] https://github.com/anoopchaurasia/combo-box

11