我如何.preventDefault()
在下面的每个事件中使用?我必须为每个事件指定它还是可以用另一种方式来做?
$("h3 a").on({
click: function(){
console.log("This is a click event");
},
mouseenter: function(){
console.log("This is a mouseenter event");
},
mouseleave: function(){
console.log("This is a mouseleave event");
},
dblclick: function(){
console.log("This is a double click event");
}, function(e){
e.preventDefault(); // not working
}
});