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

sql - MySQL - Finding Empty relations -

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

c - Android and JNI real time clock -