0
我有我听一个自定义的事件中:监听事件的多个功能
$(document).on('MyCustomEvent', function(e, data) {
});
我的问题是,我想知道什么时候MyCustomEvent
有很多不同的功能内被解雇。我不想在每个函数中附加事件处理程序,因为它没有任何意义,并可能会覆盖彼此。
什么我之后是这样的:
function one(){
//"when MyCustomEvent is fired, do stuff with the 'data' here"
}
function two(){
//"when MyCustomEvent is fired, do stuff with the 'data' here"
}
我还以为你绑定事件侦听器第二次将覆盖第一个。但我想那不是那种情况 – Johan 2013-04-24 11:52:02