开发者

Trying to show the selected option from an autocomplete input select

I'm trying to show the option that has been selected in an autocompleting input select. I'm using the autocomplete jQuery plugin.

This is the code:

$('#autocomplete_name').change(function(){
   $('#').append($('#autocomplete_name').val()); 
}); 

But when i select an option it shows the piece of text I have written in the input select, not the selected option.

Any idea?

Regards

开发者_开发问答

Javi


Read the documentation!

Something like:

$('#autocomplete_name').result(function(event, item) {
   $('#').append(item); 
});
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜