An open API service indexing awesome lists of open source software.

https://github.com/johnantoni/jquery.autocomplete

Autocomplete an input field to enable users quickly finding and selecting some value, leveraging searching and filtering.
https://github.com/johnantoni/jquery.autocomplete

Last synced: over 1 year ago
JSON representation

Autocomplete an input field to enable users quickly finding and selecting some value, leveraging searching and filtering.

Awesome Lists containing this project

README

          

Why:
jquery autocomplete 1.1 official has a bug with IE browsers (6,7,8+) which causes
the focus to go to the start of the textbox on mouse-select, rather than at the
end for autosuggestions

So:
This repository contains 1.1 official and 1.1pre, which DOES work in IE.

What i've done is run the jquery.autocomplete.1.1pre thru JSLint to fix any problems
and then compact it with Google Closure Compiler, hence version 1.1a.pre

For completeness, i've also included the official version, bgiframe (which fixes focus
in IE, sometimes) and ajaxQueue.

Happy coding

Example JS with message at bottom of autocomplete results...

var data = "Core Core Selectors Attributes Traversing Manipulation CSS Events Effects Ajax Utilities".split(" ");
$(".autocomplete").autocomplete(data, {minChars: 0});

function append_message(text) {
if ($(".ac_results").find("span").length == 0) {
$(".ac_results").append(""+text+"");
};
};

$(".autocomplete").keyup(function(){
append_message("If your country is not listed enter it anyway");
});