How do I disable an HTML form submit button without it being greyed out?
The problem: I want to grey out an entire form, and having the submit button grey out before the rest of the form does looks silly.
$("#postform").submit(function() {
//disable submit button
$("#submitPF").attr("disabled", "disabled");
//blur form
$("#postform").animate({opacity: 0.4},250);
$.post("/POST.php", $("#postform").serialize(),function() {
//free submit button
$("#submitPF").removeAttr("disabled");
//unblur
$("#postform").animate({opacity: 1},500);
});
return false;
});
}