I'm trying to do a simple onclick to child elements (without jQuery):
document.getElementById('link').children.onclick = function(){
this.style.color="#ff0000";
}
I want it to change the color to red for each element clicked. I would assume this method would work but it won't.