obtaining values from stylesheet
I don't know if this is the right way to do it but it's the way I have been doing it: create an element and use the css method. I don't know if there's a way to obtain the values from the stylesheet directly?
Anyway, I'm trying to obtain the font-size variable in here:
- #contents {
- font-size:130%;
- }
with the following:
- cBaseSz = ($("body").append(t = $("<span id=\"Contents\">"))).css("fontSize");
- t.remove();
However this returns the value in pixels ("px" at the end), and I want the literal value specified in the stylesheet. What to do...?