我需要覆盖事件,但是应用程序可以选择将原始事件返回到文档的每个元素。有任何想法吗?
例如:
<div class="mydiv">
</div>
$(document).delegate( '.mydiv', click', function () {
alert('This is the original event my event!');
});
$(document).delegate( '.mydiv', 'click', function() {
alert('Do this and ignore de previous...');
// For example: How to return the original event when mouseleave event will executed?
});
$(document).delegate( '.mydiv', 'mouseleave', function() {
// return the original event of mydiv
});