Get offsetTop & IE
<p>I am trying to get the offsetTop in IE but this simply doesn't work like I want to it.</p>

<pre><code>                var miniMap = $('#miniMap'),
                    parnts = miniMap.parents(),
                    l = parnts.length,
                    i, setVpos,
                    setHPos = $('#showMap').position().left;

                for (i = 0; i &lt; l; i += 1) {
                    if (parnts[i].className === 'smallBox') {
                        if (isIE) {
                            setVpos = parnts[i].offsetTop; // returns the wrong value
                        }
                        else {
                            setVpos = parnts[i].offsetTop; // works as it should
                        }
                    }
                }
</code></pre>

<p>As you can see I am using jQuery. I could of course use the jQuery offset/position().top &amp;&amp; .each:</p>

<pre><code>       parnts.each(function() {
            if ($(this).hasClass('smallBox')) {
                setVpos = $(this).position().top;
            } ....
</code></pre>

<p>.. BUT, I've heard ".each" is much slower than using a for loop. Also I am really curious and would love to know what you guys used before jQuery :-)</p>

<p>My problem is when doing it with a for loop I can't use the jQuery obj => position().left won't work. </p>

<p>I've Googled and found the following:</p>

<pre><code>document.getElementById("elementID").offsetLeft // all other
document.all.elementID.offsetLeft // IE only
</code></pre>

<p>I figured perhaps this could work:</p>

<pre><code>if (isIE) {
   setVpos = document.all.parnts[i].offsetTop;
}
</code></pre>

<p>.. but it didn't. So now I'm asking you guys for help instead.</p>

<p>Any suggestion? Thanks on beforehand!</p>
