title: How to check for the presence of an element?
body: <p>I'm using the <code>.length</code> method in a conditional statement that polls the page for the presence of an externally-loaded object (I can't style it with jQuery until it exists):</p>
  
  <blockquote>
  <pre><code>function hackyFunction() {
    if($('#someObject').length&lt;1)
    { setTimeout(hackyFunction,50) }
    else
    { $('#someObject').someMethod() }}
  </code></pre>
  </blockquote>
  
  <p>Is <code>length</code> the best way to do this?</p>