title: Check if div exists, if not - check again until it is created
body: <p>I have a div that is created by a plugin and <strong>appears after the page is rendered</strong> (always at different times).  </p>
  
  <p>I need to check <strong>if this div exists</strong>, then <strong>execute</strong> a set of functions. However if it <strong>does not exist yet</strong>, I want to <strong>wait(check) until it appears</strong>, then execute that set of functions.</p>
  
  <p>Here is what I'm using right now: </p>
  
  <pre><code>var check = setInterval(function(){
    if ($('#target-div').length){
      console.log('execute set of functions')
      clearInterval(check);
    }
  }, 100);
  </code></pre>
  
  <p>However, is there a way to permanently check if the div exits (like running it in the background or something) and as soon as it gets created - stop, but without <code>setInterval</code>? </p>
  
  <p>Because I have multiple similar checks and it gets a total mess having to set a new/different setInterval each time.</p>
  
  <p>Thanks.</p>