function() {
return false;
}
function(e) {
e.preventDefault();
e.stopPropagation();
}
Another very good example: href
<a href="http://www.sometest.com" class="justtest">
test</a>
the following code will show a warning and result in the default user behavior: href and www.sometst.com
$('.justtest').submit(function(ev) {
alert("a href click");
});
event.preventDefault, . www.sometest.com
$('.justtest').submit(function(ev) {
alert("a href click");
event.preventDefault();
});
SO
false jQuery , e.preventDefault and e.stopPropagation.
, , preventDefault , , .., false, .
.
http://css-tricks.com/return-false-and-prevent-default/