Reputation: 512
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!
Upvotes: 3
Views: 372
Reputation: 5849
Check out jQuery.rule (http://flesler.blogspot.com/2007/11/jqueryrule.html), sounds like what you're looking for
Upvotes: 1