I would like to return a string with all of the contents of a CSS rule, like the format you\'d see in an inline style. I\'d like to be able to do this without knowing what i
I added return of object where attributes are parsed out style/values:
var getClassStyle = function(className){
var x, sheets,classes;
for( sheets=document.styleSheets.length-1; sheets>=0; sheets-- ){
classes = document.styleSheets[sheets].rules || document.styleSheets[sheets].cssRules;
for(x=0;x 2)
classStyles[style[1]]=style[2];
}
return classStyles;
}
}
}
return false;
};