javascript - JS - location reload with delay after function executed -


i running js / ajax script update data in table , once script done, reload page. however, current code, reloads immediately, there way delay reload 3 secs?

// close modal , refresh page $('#editrecordmodal').modal('hide'); location.reload(); 

thanks

$('#editrecordmodal').modal('hide'); settimeout(function(){location.reload()}, 3000); 

Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -