This doesn't work
if( $.browser.opera ){
$("body").addClass('opera');
}
why?
This doesn't work
if( $.browser.opera ){
$("body").addClass('opera');
}
why?
Have you tried
if( $.browser.opera ){
$("body").attr("class", "opera");
}
There is no problem using addClass. When opera loads there is no 'opera' class in body when I view sourcecode, but when I add in CSS body.opera{display:none;} it's executed. So problem is in browser. Browser doesn't make jQuery changes in user visible source code of browser.