I have this input with autocomplete function:
.autocomplete({ source: "jsonR.php", minLength: 2, select: function( event, ui ) { $(this).val(ui.item.value); llamar('/includes/router.php?nomenu=1&que=view_item&id='+ui.item.id,'router'); return false; }, autoFocus: true ,open: function() { $('.ui-autocomplete').addClass('searchBox'); } })
Basically, I want the function to select the first element, so if the user gets into it, it searches for the first but it will not overhang / focus the first suggested item,
any idea why?
ps: the rest works fine, the dough
source share