【发布时间】:2015-06-05 22:41:49
【问题描述】:
我试图委托一个滚动事件,以便我的元素在 ajax 调用返回时仍然具有相同的处理程序。
我使用on 执行我的委托
$('body').on({
scroll:function(){
alert('scrolling');
},
click:function(){
alert('clicked');
}
},'.pt_pr_3_2');
点击事件有效,但滚动无效。 Here is the explanation why the scroll doesn't work
我想知道我是否还有其他选择?
【问题讨论】:
标签: javascript jquery delegates