# IE wont do a node loop more than once?

**URL:** <https://forum.kirupa.com/t/ie-wont-do-a-node-loop-more-than-once/231989>\
**Category:** web dev\
**Created:** [July 10, 2007, 10:02am UTC](https://forum.kirupa.com/t/ie-wont-do-a-node-loop-more-than-once/231989 "2007-07-10T10:02:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shard](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@Shard](https://forum.kirupa.com/u/Shard)\
**Post date:** [July 10, 2007, 10:02am UTC](https://forum.kirupa.com/t/ie-wont-do-a-node-loop-more-than-once/231989/1 "2007-07-10T10:02:00Z")

</div>

OK -I have an unordered list that that every list item contains an anchor within (a menu) and I need to loop thru it and alter the height of every anchor except the first one. I also need to ignore (from a node point of view) every even numbered node since they represent a text node. The code is as follows …

```auto

bul = document.getElementById(subnav);
for(var b = 3; b < totalnodes; b++){
   if(!isEven(b)){ // function test for even and odd numbering
      temp = bul.childNodes**.firstChild; // the anchor part of the li entry
       tt = temp.offsetTop;
       temp.style.top = (tt + heightCounter + gap) + "px"; 
       heightCounter += (sublinkHeight + gap); // increment the height counter so the next one appears below it
   }
}

```

In FF everything works fine (I can even trace/alert the vars all the way thru) but in IE it works only for the first loop (where b = 3). A trace shows all the same values as FF, but it just doesnt want to come back for more???  
Any clues???  
Any help greatly appeciated cause soon I will animate that height adjustment (e.g. increment it slowly).
