title: How check if elements exist in timer sequence
body: <p>I was wondering would there be a way for me for do a check if an id exist and if exist do my function then check if next id exist</p>
  
  <p>an example: if log2627251 exist do my function then check or wait for log2627252 exist then do function and keep going</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var checkExist = setInterval(function() {
     if ($('#log2627251').length) {
        console.log("if exists do function then find next id");
        clearInterval(checkExist);
     }
  }, 100);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  
  &lt;li id="log2627251" data="2627251" class="ch_logs"&gt;Text&lt;/li&gt;
  
  &lt;li id="log2627252" data="2627252" class="ch_logs"&gt;Text&lt;/li&gt;
  
  &lt;li id="log2627253" data="2627253" class="ch_logs"&gt;Text&lt;/li&gt;
  
  &lt;li id="log2627254" data="2627254" class="ch_logs"&gt;Text&lt;/li&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>sorry bad english</p>