Answer the question
In order to leave comments, you need to log in
How to solve .length issue after getElementsByClassName hack in ie?
There is a parallax.js library which has getElementsByClassName. To work in IE7> registered:
function getElementsByClassName(node, classname) {
var a = [];
var re = new RegExp('(^| )'+classname+'( |$)');
var els = node.getElementsByTagName("*");
for(var i=0,j=els.length; i<j; i++)
if(re.test(els[i].className))a.push(els[i]);
return a;
}
var parallaxLayer = getElementsByClassName(document.body,'layer');
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question