0
我需要覆蓋事件,但應用程序有一個選項可以將原始事件返回到文檔的每個元素。有任何想法嗎?如何在指定新事件時避免並返回jquery中的事件?
例如:
<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
});
爲什麼要將多個'click'事件分配給同一個元素? – 2013-03-21 11:56:05