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
- erik’s weblog: Computed vs Cascaded Style
- Ajaxian: Computed vs Cascaded Style
- outaTiME: Computed vs Cascaded Style