"return false
" seems to work in the submitHandler
but I'm not sure why.
function submitHandler() {
$.post($(this).attr('action'), $(this).serialize(), null, "script");
return false;
}
$(document).ready(function () {
$('#top_cat').submit(submitHandler);
$("#tip_click").click(function() {
$("#high_hat").submit(submitHandler);
});
});
I'm also not sure if I need to add a "return false
" in the #tip_click
function so that it reads like this:
$("#tip_click").click(function() {
$("#high_hat").submit(submitHandler);
return false;
});
What's the rule to follow here regarding when to "return false
"?