按照@roasted的回答
我强制旧事件处理程序作为新事件处理程序的回调运行:
例子:
$('#myBtn').click(function(){
alert(1);
});
$('#myBtn').click(function(){
alert(2);
});
$('#myBtn').click(function(){
alert(3);
});
$('#myBtn').click(function(evt){
alert(4);
});
//------Adding A Custom Function Befor All Click Event Handlers And Forcing Theme Run As Callback Of The Custom Function--------
console.clear();
var objEvents=jQuery.extend(true, {}, $._data( $("#myBtn")[0], "events" ));
$('#myBtn').unbind('click');
var callEventHandlers=function(myEventName,myEvents){
$.each(myEvents, function(i, event) {
if(i==myEventName){
$.each(event, function(j, h) {
// console.log(h.handler.toString());
h.handler.call()
});
}
});
}
$('#myBtn').click(function(evt){
$(this).fadeOut(3000,function(){callEventHandlers('click',objEvents)});
});