I really like the + selector and don’t want to add another css rule just for a IE6 workaround.
So is there a jquery-way to check all existing css rules if it’s using the + selector and to then modify the element.
Something like this:
if (IE6)
for (var rule in $.cssrules)
if (rule.selector.find('+'))
$(rule).style = rule.style; // here the + selector works even for IE6 because jquery emulates it.
So the basic question is: can I get an array (or something else) of all css rules defined in the document?
Cheers,
Manuel
There is a way to do that. In fact, a JavaScript library called IE7 already does that and much more – it enables most CSS selectors on Internet Explorer 6 and even 5:
http://code.google.com/p/ie7-js/ .
I should say I haven’t used it myself, but I’ve heard good thing about it.