Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js settimeout wait element

var checkExist = setInterval(function() {
   if ($('#the-canvas').length) {
      console.log("Exists!");
      clearInterval(checkExist);
   }
}, 100); // check every 100ms
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #settimeout #wait #element
ADD COMMENT
Topic
Name
8+2 =