jQuery PreventDefault
$("a").click(function(event){
event.preventDefault();
});
Wrong Weevil
$("a").click(function(event){
event.preventDefault();
});
function(event) {
event.preventDefault();
}
$('form').submit( function(ev){
ev.preventDefault();
//later you decide you want to submit
$(this).unbind('submit').submit()
});
event.preventDefault();
document.querySelector("#id-checkbox").addEventListener("click", function(event) {
document.getElementById("output-box").innerHTML += "Sorry! <code>preventDefault()</code> won't let you check this!<br>";
event.preventDefault();
}, false);