Jquery是否侦听触发的事件?

Jquery是否侦听触发的事件?,jquery,Jquery,我通过以下方式在infiniteScroll类中创建事件: $.event.trigger('load'); 然后我通过以下方式来倾听: this.infiniteScroll = new gd.InfiniteScroll(); this.infiniteScroll.on('load', this.loadData); 但这失败了,我得到了错误: Uncaught TypeError: Object [object Object] has no method 'on' 知道我哪里出错

我通过以下方式在infiniteScroll类中创建事件:

$.event.trigger('load');
然后我通过以下方式来倾听:

this.infiniteScroll = new gd.InfiniteScroll();
this.infiniteScroll.on('load', this.loadData);
但这失败了,我得到了错误:

Uncaught TypeError: Object [object Object] has no method 'on' 

知道我哪里出错了吗?

jQuery版本问题?。。您使用的是哪个版本?是否确定在加载jquery之后加载脚本是的,它在jquery之后加载。是否从InfiniteScroll方法返回jquery对象?我不确定?你能给我举个例子吗