Selecting a large number of elements in a web page one by one
<p>Ok, lets get into it...</p>

<pre><code>var d = document.getElementsByTagName("DIV");
var i = 0;
var de;
function show()
{
    setTimeout('boo()',250);
}
function boo()
{
    de = d[i];
    de.style.webkitTransform = 'rotate(0)';
    i++;
    if (d[6].style.webkitTransform !== 'rotate(0)')
    {
        show();
    }       
}

function det()
{
    setTimeout("document.getElementById('bbb').innerHTML = i;", 1000);
}
</code></pre>

<p>I KNOW something is wrong, because this code just feels fishy... And it crashes Safari from time to time...</p>

<p>Any ideas what might be wrong here, or how I can improve the code? </p>

<p>I'm a noob programmer, so I'd appreciate a small explanation of all the 1337 code where everything I'm trying to do in 24 lines, y'all do in 2... Lol...</p>

<p>Thanks!</p>
