Renegade, on 10 April 2012 - 09:43 AM, said:
Array.prototype.forEach.call(document.getElementsByClassName("class"), function(v, i) {
if(i < 5) v.style.backgroundColor = "#f30e24";
});
:>
IE :-(
Show message
Join up (it's free!) whether you're just starting out or you're crazy advanced. Get tips from people who know what they're talking about, without being treated like the playground smelly kid. Because seriously, your school classes didn't teach you anything you wanted to know.

Posted 10 April 2012 - 10:23 AM (#21)
Renegade, on 10 April 2012 - 09:43 AM, said:
Array.prototype.forEach.call(document.getElementsByClassName("class"), function(v, i) {
if(i < 5) v.style.backgroundColor = "#f30e24";
});
Posted 10 April 2012 - 10:44 AM (#22)
callumacrae, on 10 April 2012 - 10:23 AM, said:
Posted 10 April 2012 - 10:54 AM (#23)
arronhunt, on 30 June 2012 - 10:09 PM, said: