I believe you want the autoFocus
option:
If set to
true
the first item will automatically be focused when the menu is shown.
With that in mind, you'd simply need to change your initialization of the widget:
function callAutocomplete(element)
{
$(element).autocomplete(
{
source: "get_sku_codes",
messages:
{
noResults: '',
results: function() {}
},
select: function( event, ui )
{
var selectedObj = ui.item;
alert(selectedObj);
},
autoFocus: true
});
}
Example: http://jsfiddle.net/WP29E/132/