I'm doing a form validation and I use Jquery Validate()
but I have a problem. I indicate the code
$("#formBloqueo1").validate({
success: function() {
$("body").css({"overflow-y":"hidden"});
var alto = $(window).height();
$("body").append("<div id='pre-load-web'><div id='imagen-load'><img src='/img/loading.gif' alt=''/><h1>Realizando Validación</h1></div></div>");
$("#pre-load-web").css({"height":alto+"px"});
$("#imagen-load").css({"margin-top":(alto/2)-30+"px"});
//Aqui realizo mis comprobaciones
$("#formBloqueo1").attr('action', nuevaUrl);
$("#formBloqueo1").attr('method', 'POST');
$("#formBloqueo1").submit();//Hago submit
The problem is that with the code above, the pre-load-web html appears duplicated and the gif does not appear, but if this line:
$("#formBloqueo1").submit();//Hago submit
I comment it so that it does not submit, the div appears perfect and the gif also, some idea of what the problem may be?
Thanks in advance