A
Aaron Gray
Whats going on with setAttribute on IE it appears to work on some examples
and working code but not on other code that I am writting ?
<style>
.foo {
font-size: 200%;
}
</style>
var e = document.createElement( "div");
e.setAttribute( "class", "foo"); // fails
e.setAttribute( "className", "foo"); // okay
e.setAttribute( "style", "font-size: xx-large"); // fails
e.setAttribute( "style.fontSize", "xx-large"); //fails
e.setAttribute( "style", "font-size: 24pt;"); //fails
e.style.fontSize = '24pt'; // okay
e.className = 'foo'; // okay
e.appendChild( document.createTextNode( "Text Text Text"));
document.body.appendChild( e);
Anyone help fill in the gap in my head !
Many thanks in advance,
Aaron
and working code but not on other code that I am writting ?
<style>
.foo {
font-size: 200%;
}
</style>
var e = document.createElement( "div");
e.setAttribute( "class", "foo"); // fails
e.setAttribute( "className", "foo"); // okay
e.setAttribute( "style", "font-size: xx-large"); // fails
e.setAttribute( "style.fontSize", "xx-large"); //fails
e.setAttribute( "style", "font-size: 24pt;"); //fails
e.style.fontSize = '24pt'; // okay
e.className = 'foo'; // okay
e.appendChild( document.createTextNode( "Text Text Text"));
document.body.appendChild( e);
Anyone help fill in the gap in my head !
Many thanks in advance,
Aaron