It's always fun to stumble across something new from time to time.
I was wandering through some code today and came across a very useful property: [!]cssText[/!]. This returns any style that has been applied directly to a node (not via a CSS, but by the style="" method) as a string.
This could easily be split into an array (using the semi-colon) allowing you to iterate over the individual styles.
Just thought some others might be interested in that.
Cheers,
Jeff
[tt]Jeff's Page [!]@[/!] Code Couch
[/tt]
Make sure your web page and css validates properly against the doctype you have chosen - before you attempt to debug a problem!
FAQ216-6094
I was wandering through some code today and came across a very useful property: [!]cssText[/!]. This returns any style that has been applied directly to a node (not via a CSS, but by the style="" method) as a string.
Code:
...
<div id="wibble" style="font-size: 1em; color: red; margin-left: 0.2em;">...</div>
...
Code:
...
alert(document.getElementById('wibble').style.cssText);
// alerts: font-size: 1em; color: red; margin-left: 0.2em;
This could easily be split into an array (using the semi-colon) allowing you to iterate over the individual styles.
Just thought some others might be interested in that.
Cheers,
Jeff
[tt]Jeff's Page [!]@[/!] Code Couch
[/tt]
Make sure your web page and css validates properly against the doctype you have chosen - before you attempt to debug a problem!
FAQ216-6094