开发者

Populate listbox/select with results from jQuery autocomplete

I am trying to populate a select or listbox control from the results in jQuery autocomplete plugin. I do not want to display the div开发者_运维百科 below the autocomplete control when the results are returned. Any help?


UPDATE:

Here's the code I am trying to populate the listbox:

formatItem: function (data) {
    $('#lstBox').append($("<option/>"), {
        value: data.Name,
        text: data.Name
    });
    return '';
}


Supposing you are using this plug in, have you tried:

$('input#suggest').setOptions({
 max: 0
});

if that does not work try:

$('input#suggest').setOptions({
 scrollHeight: 0
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜