autocomplete, continued

This commit is contained in:
Rolux 2010-02-18 20:49:36 +05:30
parent 797b3c1927
commit adb452f855

View File

@ -1574,9 +1574,8 @@ requires
});
}
function autocomplete(items) {
var selected;
var selected = 0;
if (items.length) {
selected = items.length == 1 ? 0 : -1;
items = $.map(items, function(title, position) {
if (that.val().toLowerCase() == title.toLowerCase()) {
selected = position;
@ -1625,7 +1624,7 @@ requires
self.value = value;
self.options.autocomplete(self.value, autocomplete);
}
}, 50);
}, 25);
}
}
function onClick(event, data) {