Rate this script:  I Love it  /   I Hate it

Faster looping over DOMCollections


Code


var i=0, el;
while (el = document.getElementsByTagName('div').item(i++)) {
    // use el here
}
 

 

 
Faster looping over DOMCollections scripts | Faster looping over DOMCollections snippet | Faster looping over DOMCollections example | Faster looping over DOMCollections tutorial | Faster looping over DOMCollections code