tags:

views:

50

answers:

1

Does jQuery provide a way to lookup a style defined in a CSS class without first assigning that class to an element?

e.g. given the following CSS I would like to retrieve the Color style assigned to myClass -

.myClass {
  color: #ff0000;
}

So far the only way I've found is to temporarily assign the class to an element and then interrogate the element, but I get inconsistant results between different browsers.

Thanks for your time!

+1  A: 

Check out jQuery.rule (http://flesler.blogspot.com/2007/11/jqueryrule.html), sounds like what you're looking for

K Prime
Thanks, I'll check it out and post my results.
Andrew
Nice.... that is going to come in so handy!
prodigitalson