开发者

Using TextboxList events and callbacks

Has anyone gotten callbacks working with Guillermo Rauch's TextboxList Autocomplete? I've tried multiple ways to bind and multiple events (e.g. hover) - nothing seems to register.

$('#entSearch').textboxlist({unique: true, plugins: {
            autocomplete: {
                minLength: 3,
                queryRemote: true, 
                placeh开发者_StackOverflow社区older: 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):

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');
        });
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜