javascript - Autocomplete hover removing autofill -


i'm trying alter behaviour of autocomplete little. i've got mock here http://jsfiddle.net/ekzmn/6/ producing desired result (a la chrome address bar) - pictured below (currently case sensitive).

enter image description here

the problem i'm having when autocomplete list showing , hover on items in list, input value changes inputted term rather staying on adjusted term autofill. i.e. in above image change hackn [ey, eastern cape, south africa] hackn.

i guess bit of default autocomplete behaviour need overide can't work out. i've tried focus: false , blur: false no avail.

thanks.

is you're trying achieve - input text change based on hovered item? http://jsfiddle.net/ekzmn/8/ override focus event:

focus: function(event, ui){         $("#location").val(ui.item.label);         return false;     }, 

if want text set first index , not change whenever hover on list, can set first index of result list.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -