I am having this a = document.getElementsByTagName('a');
and a
seems like it is undefined. Because this
for (i=0; i< a.length; i++) {
a[i].style.backgroundColor = bgColors;
a[i].style.borderColor = borderColors[i];
a[i].onmouseover = function () {
a[i].style.backgroundColor = bgHoverColors[i];
a[i].style.color = fontHoverColors[i];
a[i].style.borderColor = borderHoverColors[i];
};
};
is printing Cannot set property 'color' of undefined
. I have looked a little but i didnt find something helpfull. I readed already the Javascript infamous Loop issue?
but i couldnt still fix my code.