IE8 doesn’t support (for instance, but not exclusive to) :last-child, so often I find myself doing something like:
/* CSS */
element:last-child,
element.last-child{
/* properties */
}
/* jQuery */
$('element:last-child').addClass('last-child');
Since jQuery provides support for natively unsupported CSS selectors, is there a way to simply evaluate a CSS stylesheet, and have jQuery (re-) apply the styles without having to resort such frivolous element classing?
Something like:
$('link[rel="stylesheet"]').each(function(){
$.reapplyStylesheet($(this).attr('href'));
});
Note: Given the plethora of ways to implement browser-specific CSS, there is with certainty another (perhaps better) way to do this, however I’m still curious.
http://selectivizr.com/