Here is the function, I just want it to commit or activate when the form is submited only.
Currently, I have to add onclick="ShowProgressAnimation();" to each form, I want to take place when submit is clicked, global setting
function ShowProgressAnimation() {
$("#loading-div-background").css({ opacity: 0.8 });
$("#loading-div-background").show();
$(".button-2").hide();
}
You can bind it to the
submitevent of the form:Just be careful that your form will be submitted, won’t it?