Forum Moderators: open
if(node.currentStyle) {
// applies to msie only
node.style.property = newValue;
} else {
node.style.setProperty("property", newValue, "");
} Edit: OK, you wanted setAttribute instead of setProperty. The solution should be similar...