📜  js 等待元素加载 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:13.805000             🧑  作者: Mango

代码示例5
var checkExist = setInterval(function() {
   if ($('#the-canvas').length) {
      console.log("Exists!");
      clearInterval(checkExist);
   }
}, 100); // check every 100ms