Although I'm not a big fan of browser sniffing - http://www.ebook-search-queen.com/ebook/brow/browser+sniffing.all.html , I can see how this sort of thing might come in handy from time to time. I'd suggest pulling the script out of the $(document).ready() function, though, and adding the class to the html element rather than to the body. This way you can avoid the flash of unstyled content that can occur with complex DOM structures.
Although I'm not a big fan of
Although I'm not a big fan of browser sniffing - http://www.ebook-search-queen.com/ebook/brow/browser+sniffing.all.html , I can see how this sort of thing might come in handy from time to time. I'd suggest pulling the script out of the $(document).ready() function, though, and adding the class to the html element rather than to the body. This way you can avoid the flash of unstyled content that can occur with complex DOM structures.