tags:

views:

77

answers:

1

Hi there

I'm look for a way to search a .css style sheet for a class. The particular class would not have been assigned to any particular DOM element as of yet, it is simple in the style sheet.

I saw another thread which said I could use document.styleSheet, but this requires me to know which order the css file is loaded by the document and also which number the class is defined in the style sheet.

I'm just looking for something like:

var $cssClassHeight = $(document).loadCSS('myClass', 'height');
var $cssClassWidth = $(document).loadCSS('myClass', 'width');

Anything out there like this, or am I going to have to assign it to a dummy div and then read it from it's attributes?

Thanks

Syn

+1  A: 

This jQuery plugin allows you to change the properties of a CSS class, so maybe you could alter it to query them instead.

Jordan Stewart
Guess I'm going to have to do that then.Thanks
SynackSA
@SynackSA any news about your implementation?
Khaled Al Hourani