Displaying 1 result from an estimated 1 matches for "ssheetselector".
2006 Jun 13
0
Code comments?
...erty, sValue) {
// Update the property value for a specific sSelector in a stylesheet
$A(document.styleSheets).each(function(oStyleSheet) {
$A(oStyleSheet.rules ||
oStyleSheet.cssRules).each(function(oRule) {
oRule.selectorText.split('','').each(function(sSheetSelector) {
if(sSheetSelector == sSelector)
oRule.style[sProperty] = sValue;
});
});
});
},
Sample usage:
cssSelectorUpdate( ".myclass", ''color'', ''#ff0000''); // .myclass is a...