Displaying 1 result from an estimated 1 matches for "sselectors".
Did you mean:
selectors
2006 Jun 13
0
Code comments?
...a specific sSelector in a stylesheet
for(var i = 0; document.styleSheets.length > i; i++) { //
Mozilla
var oRules = document.styleSheets[i].rules ||
document.styleSheets[i].cssRules;
for(var j = 0; oRules.length > j; j++) {
var sSelectors = oRules[j].selectorText;
// string of all selectors on this line
var aSelectors = sSelectors.split('','');
// separate all selectors
for(var k=0; k<aSelectors.length; k++) {
if(aSelectors[k] == sSelector) {...