I wanted to have the following behaviour:
- Set the minChars of an autocompleter to 0
- When the focus is set to this field, it should automatically get its
autocomplete results from the specified URL.
Apparently, I needed a hack to get this working:
if (options.minChars == 0 && !$input.val()) {
request('', receiveData, hideResultsNow)
}
else {
$.each(trimWords($input.val())
, function(i, value) {
request(value, findValueCallback, findValueCallback);
});
}
(the $.each() with the subsequent request() are on line 186..188 of the original autocomplete 1.1 non-minified version)
Did I do something wrong with my arguments, or is this a case that was not working in the first place?