mpen mpen - 3 months ago 7x
jQuery Question

How to get jQuery Autocomplete to pop up on field focus?

Possible Duplicate:

jQuery autocomplete UI- I'd like it to start the search onfocus without the user having to type anything

jQuery UI Autocomplete

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.

$("#yourField").bind('focus', function(){ $(this).autocomplete("search"); } );

Here a jsfiddle: Updated one (for IE):

As enlighted by @HoldOffHunger you must also set minLength to 0