getStyle
Function
This function is used to retrieve the current styles being applied to a given element. It has been written to deal with several cross-browser inconsistencies, including the different formats used to express a color in RGB and several IE issues. I have noted a few other known issues in a comment below the function in the code.
How To Get The Script
You can download the script here.
Demonstration
Related Links:
- erik’s weblog: Computed vs Cascaded Style
- Ajaxian: Computed vs Cascaded Style
- outaTiME: Computed vs Cascaded Style
Last update: 2008-01-23