有没有人与Guillermo Rauch的TextboxList Autocomplete一起回调?我尝试了多种绑定方式和多个事件(例如悬停) - 似乎没有注册。
$('#entSearch').textboxlist({unique: true, plugins: {
autocomplete: {
minLength: 3,
queryRemote: true,
placeholder: false,
remote: {
url: "{{=URL(r=request, f='call/json/suggest')}}",
extraParams: {type: "", guid: ""}
}
}
},
onHover: function(token) {
alert('hover 1');
}
});
$('#entSearch').hover(function() {
alert('hover 2');
});
$('#entSearch').bind('hover', function() {
alert('hover 3');
});
答案 0 :(得分:1)
作者以非常具体的方式为TextboxList启用了侦听器(请参阅this page上的“事件”):
var t = new $.TextboxList('#entSearch', {unique: true, plugins: {
autocomplete: {
minLength: 3,
queryRemote: true,
placeholder: false,
remote: {
url: "{{=URL(r=request, f='call/json/suggest')}}",
extraParams: {type: "", guid: ""}
}
}
}
});
t.addEvent('bitBoxAdd', function(bit) {
alert('add');
});