⬅︎ Back to setAttribute('style', ...) workaround for IE
I forgot to tell why I decided to "improve" it: if you put a white space in the css declaratio, such:background-color: #FFFFFF;the original code will miss it. You had to put it together for it to work, like:background-color:#FFFFFF;Oh, and the function declaration in my version is for prototype. If you don't use this technique just change the declaration to:function _setStyle (aElement /* object */, aDeclaration /* CSS Declaration */)That's it. Cheers!
Comment
I forgot to tell why I decided to "improve" it: if you put a white space in the css declaratio, such:
background-color: #FFFFFF;
the original code will miss it. You had to put it together for it to work, like:
background-color:#FFFFFF;
Oh, and the function declaration in my version is for prototype. If you don't use this technique just change the declaration to:
function _setStyle (aElement /* object */, aDeclaration /* CSS Declaration */)
That's it.
Cheers!