我试图附加一个简单的点击事件与jQuery自动完成。这是代码即时通讯使用:jquery点击事件与自动完成
$("#term").autocomplete({
source: function(request, response) {
$.ajax({
url: 'http://query.yahooapis.com/v1/public/yql',
dataType: 'JSONP',
data: {
format: 'json',
q: 'select * from xml where url="http://google.com/complete/search?output=toolbar&q=' + escape(request.term) + '"'
},
success: function(data) {
response($.map(data.query.results.toplevel.CompleteSuggestion, function(item) {
return { label: item.suggestion.data, value: item.suggestion.data };
}));
}
});
}
});
我想可以点击列表中的项目,然后将触发另一个请求(EA填充另一个列表)我想用jQuery的单击事件要做到这一点,到目前为止,不好,看到这个LINK
我有一个类似的问题做到这样。发布[这里]答案[1] [1]:http://stackoverflow.com/questions/8158246/firing-the-select-event-on-click-for-jquery-autocomplete/12220921 #12220921 –