[jQuery] style selector (noob question)

[jQuery] style selector (noob question)


Hi, does anyone know if it's possible to extract a style attribute
from a style (and not an element)?
For instance:
<style>
.myclass { background-color:white; }
</style>
I have some legacy javascript that takes colors as parameters to
functions and i'd like to be able to define those in a style sheet and
then 'extract' the colors from that.
I can only get it to work if I do something like this:
<div class="myclass" />
...
var color = $(".myclass").css("background-color");
any ideas?
Craig.