I want to paralyze setTimeout
with clearTimeout
but there is no way.
The code is as follows:
function limpiarModal(){
$("#ventana-emergente").animate({top:"-350px"},1000);
set=setTimeout(function(){$("#ventana-modal").css("visibility","hidden")}, 1000);
$("body").removeClass("clase-modal-body");
$("#ingresar-nav").css('cursor', 'pointer');
clearTimeout(set);
}
The issue is that I want $("#ventana-modal)
to be hidden after 1 second and with clearTimeout
"clean" the accumulation of setTimeout
.