jquery autocomplete remove focus after suggest -


after selecting item in autocomplete list, script validates selection not release focus. ive tried place focus on element dissapointment.

this code:

var usernames = [<? print_r($jquery_usernames); ?>];             $("#suggest1").autocomplete(usernames);              $("#suggest1").result(function() {                     $(this).submit();                     settimeout(function() {                       $('#focusdiv').focus();                     }, 1);                                   }); 

any suggestions?

this interesting , works (the focus removed suggest1 input):

$("#suggest1").autocomplete(usernames);          $("#suggest1").result(function() {                 $(this).submit();                                    settimeout(function() {                   $('.next-step').focus();                 }, 1);                               }); 

note: doesnt work without settimeout function. '.next-step' clickable href (tabbed form)


Comments