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.version
is what you're looking for. And you should probably parseFloat
it.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With