📜  等到元素可见 javascript 代码示例

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

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