check if element is inserted on page
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/31044/is-there-an-exists-function-for-jquery">Is there an &ldquo;exists&rdquo; function for jQuery</a>  </p>
</blockquote>



<p>Is there a better way to check if the element is already inserted on page? I'm currently doing this and is working fine, but doesn't seem for me to be the best/fast way</p>

<pre><code>$(element).closest('body').length &gt; 0
</code></pre>

<p>Thanks.</p>

<p><strong>Edit:</strong></p>

<p>I doesn't need to know if my element exists, I need to know if it's on page.</p>
