In ie8 if elements don\'t \'repaint\' with the associated css when you change the classname, how can you force the browser to refresh and not kill ie8 performance?
This
The solution I came up with for my ie8 issue was to add/remove a class on a near parent of the element i'm changing. Since I'm using modernizer, I check for ie8 and then do this add/remove dance to get the new css to paint.
$uicontext.addClass('new-ui-look');
if ($('html').is('.ie8')) {
// IE8: ui does not repaint when css class changes
$uicontext.parents('li').addClass('z').removeClass('z');
}