Need to cancel click/mouseup events when double-click event detected
问题 How is this done? 回答1: This is a good question, and I actually don't think it can be done easily. (Some discussion on this) If it is super duper important for you to have this functionality, you could hack it like so: function singleClick(e) { // do something, "this" will be the DOM element } function doubleClick(e) { // do something, "this" will be the DOM element } $(selector).click(function(e) { var that = this; setTimeout(function() { var dblclick = parseInt($(that).data('double'), 10);