View Full Version : how to Hide JS function from IE 6
yaksho
03-01-2010, 04:44 PM
Hi there,
I want to hide this JS function from IE 6 and 7
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(document).ready(function () {
$('.nav').fadeIn(3000);
});
});
</script>
How can I do it???
tomws
03-01-2010, 05:05 PM
http://api.jquery.com/jQuery.support/
http://api.jquery.com/jQuery.browser/
rnd me
03-02-2010, 06:52 AM
$(document).ready(function(){
if("\v!=v" || window.postMessage){
$('.nav').fadeIn(3000);
};
});
SSCR9
03-02-2010, 07:28 AM
http://lmgtfy.com/?q=jquery.browser
VIPStephan
03-02-2010, 12:20 PM
Don’t use jQuery.browser, it’s deprecated and bad practice to check for browser versions. Rather, you should check for support of certain methods which can be done with jQuery.support as tomws already mentioned. Also, in another forum someone mentioned that the thickbox script is using:
if(typeof document.body.style.maxHeight === "undefined") {
alert('ie6');
} else {
alert('other');
}
You can check for other unsupported CSS properties like this to trigger IE 6.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.