var dial = document.getElementById("x2"); var root = dial.instanceRoot; var children = root.childNodes; for(var i = 0; i< children.length;i++) { if (children.item(i).correspondingElement.getAttribute('id') == 'needle') { var needle = children.item(i).correspondingElement; needle.setAttribute("transform","rotate("+angle2+" 64, 64)"); } if (children.item(i).correspondingElement.getAttribute('id') == 'counter') { var counter = children.item(i).correspondingElement; counter.textContext = angle2; } }
//document.getElementById("counter").textContent = angle2;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)