Reputation: 4212
I'm using the Jquery autocomplete: Autocomplete
I would like to open the autocomplete with event click:
$(div).live('click', function(e){
...?????....
});
What can I do to open it?
Upvotes: 2
Views: 2076
Reputation: 40502
From documentation of search method:
Can be called with an empty string and minLength: 0 to display all items.
So, your code should be:
$(div).live('click', function(e) {
$(div).autocomplete("option", "minLength", 0).autocomplete("search", "");
});
Upvotes: 4