nzc
0
Q:

settimeout function


 setTimeout(function(){ alert("Hello"); }, 3000);
 
3
setTimeout(function(){
 	alert("Sup!"); 
}, 2000);//wait 2 seconds
52
setTimeout(function(){ alert("Hello"); }, 3000);
1

 setTimeout(function(){ alert("Hello"); }, 3000);

 //1000ms = 1 second
8
setTimeout(() => { alert('Hello') }, 1000)
9

 setTimeout(function(){ alert("Hello"); }, 3000);

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

New to Communities?

Join the community