I am trying to use
jQuery(document).ready(function () {
if (!jQuery.browser.msie <= 7.99) {
jQuery('#element').css('display', 'block');
}
});
But it doesn’t appear to work ? What am I doing wrong ?
Thx
Edit: Use conditional comments
<!--[if !IE]>
<!--[if lt IE 8]>
//do stuff
<![endif]-->
<![endif]-->
jQuery.browser.versionis what you’re looking for. And you should probablyparseFloatit.In general though, it’s looked down upon to rely on browser sniffing unless there’s absolutely no way to feature detect. It might help telling us what your real problem is.
EDIT: You should use conditional comments to serve rules/stylesheet(s) for IE7 and below.