Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery wait for element to exist

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