title: If selector exists - run code else repeat check
body: <p>I'm trying to check if a selector exists, if it does I would like it to run some code, if it doesn't I would like it to repeat the check. </p>
  
  <p>The reason I want to do this is because I know an element WILL exist, but I will not know when. </p>
  
  <p>Something like this:</p>
  
  <pre><code>if ($(.element).length ) {
      // Do something
  }else{
  //check again
  });
  </code></pre>
  
  <p>Any ideas?</p>