Possible Duplicate:
jQuery autocomplete UI- I'd like it to start the search onfocus without the user having to type anything
I want the options to appear as soon as my input is focused. Is there a setting for that? I tried setting minLength to 0, but it doesn't work... it still waits for a keypress.
Here a jsfiddle: http://jsfiddle.net/fpHf4/2/ Updated one (for IE): http://jsfiddle.net/q9ERL/4/
As enlighted by @HoldOffHunger you must also set minLength to 0
I think u are breaking "autocomplete" utility just making a stylized select, thats the reason to wait for a keypress to have something to complete.
I know its not the anser u looking for, just remember this u trying to do just work with few options, if there are many u will get hard autocomple div load on firsts letters.
Or maybe u can have a 10 result records on ur sql query if is from this so get fast without loading all sort of results
--- I test focus bind on ie8, it fails, by the way its no a fail it does exactly what u want open div box on focus, the difference is that IE fires onFocus event whith jquery focus event, not like the others so su must evaluate on focus event if field its empty launch search , if is not just do nothing.. i hope this helps.
Here's my full solution (it does a few other things too):
Here's a solution that doesn't pop open the list a second time after selecting an item (as mentioned by Mark) and also works when the input box already has text:
jQuery autocomplete UI- I'd like it to start the search onfocus without the user having to type anything