[英]Using TextboxList events and callbacks
Has anyone gotten callbacks working with Guillermo Rauch's TextboxList Autocomplete ? 有没有人得到与Guillermo Rauch的TextboxList Autocomplete一起使用的回调? I've tried multiple ways to bind and multiple events (eg hover ) - nothing seems to register. 我尝试了多种绑定方式和多个事件(例如hover )-似乎没有任何注册。
$('#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');
});
The author enabled listeners in a very specific way for TextboxList (see "Events" on this page ): 作者以一种非常特定的方式为TextboxList启用了侦听器(请参阅本页上的“事件”):
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');
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.