jquery - How to set time delay in javascript - Stack Overflow

PHOTO EMBED

Sun Sep 06 2020 07:22:22 GMT+0000 (Coordinated Universal Time)

Saved by @sailomtaaley #javascript

var delayInMilliseconds = 1000; //1 second

setTimeout(function() {
  //your code to be executed after 1 second
}, delayInMilliseconds);
content_copyCOPY

หน่วงเวลาไว้ 1 วินาที แล้วค่อย Run เข้าฟังก์ชั่น

https://stackoverflow.com/questions/17883692/how-to-set-time-delay-in-javascript