setTimeout(function(){ alert("Hello"); }, 3000);
setTimeout(function(){ alert("Sup!"); }, 2000);//wait 2 seconds
setTimeout(function(){ alert("Hello"); }, 3000); //1000ms = 1 second
setTimeout(() => { alert('Hello') }, 1000)
$(".submit_wide").click(function () { $(this).val('Please wait..'); $(this).attr('disabled', true); setTimeout(function() { $(this).attr('disabled', false); $(this).val('Submit'); }, 2000); });
window.setTimeout(()=>{ console.log('1 second passed!'); }, 1000);
// Redirect to index page after 5 sec setTimeout(function(){ window.location="index"; },5000);
setTimeout(function(){ $('#overlay'). modal('hide') }, 5000); //#overlay will be the ID of modal which you want to hide or show modal