fastest way to find element position using javascript?
<p>I've used jquery's offset().top, but when running it 4000 times in a loop the browsers freezes for a few seconds. Is there a faster way to get this? </p>

<p>This is happening on the iPAD the desktop is faster.</p>

<pre><code>for (counter=1; counter&lt;4000; counter++)
{
   yPos = Math.round($("#star_"+counter).offset().top);
</code></pre>
