quote:
Originally posted by ShawnZ
BTW:
function getElementsByClassName(checkClassName) {
r = new array(document.elements.length);
for (i=0;i<document.getElementsByTagName('div').length;i++) {
if (document.elements[i].className == checkClassName) {
r[] = document.elements[i]
}
}
return r;
}
getElementsByClassName('spoiler') == an array of all the page elements with the class name spoiler, afaik
What happens if it has more than one class?