Autocomplete on a click of button

Autocomplete on a click of button

Hi,

I am  using JQuery Autoplugin 1.1, I want to activate the autocomplete on a text box on click of a button besides the box.Currently I am trying to use the following  option, but it is not  working.

Here try is the id of button and try1 is the  id of text box

$("#try).click( function() {

$("try1").autocomplete( months, {
minChars: 0,
max: 5,
autoFill: false,
mustMatch: true,
matchContains: true,
scrollHeight: 220,
scroll:false,
formatItem: function(data, i, total) {
return data[0];
}
});
});