2
I have a form with validation, and I need to enter after validating this form a waiting hourglass (as if loading the page).
I would like to know how to join these two functions, and after validating the form, triggers the other:
//Validacao cadastro-completo.php
$("#form3").validate({
rules: {
constituicao: {
required: true,
minlength: 10,
validadata: true
},
email: {
required: true,
email: true
},
messages: {
constituicao: {
required: "Esse campo é obrigatório",
minlength: "Data Inválida"
},
email: {
required:"Esse campo é obrigatório",
email: "Email inválido"
}
}
});
function loading() {
$('body').append("<div class='loading'></div>");
}
$('.open-loading').click(function () {
loading();
});
Perfect, worked.
– Alan Henrique