Fade out menu doesn't work in IE8
- by user1787488
I used this script in my website. But it doesn't work in IE8 or lower versions.
Is it possible to work perfectly in all browsers?
<script type="text/javascript" src="/web/upload/js/jquery-1.3.2.js"></script>
<script type="text/javascript">
$(function() {
$(window).scroll(function(){
var scrollTop = $(window).scrollTop();
if(scrollTop != 0)
$('#header').stop().animate({'opacity':'0'},400);
else
$('#header').stop().animate({'opacity':'1'},400);
});
$('#header').hover(
function (e) {
var scrollTop = $(window).scrollTop();
if(scrollTop != 0){
$('#header').stop().animate({'opacity':'1'},400);
}
},
function (e) {
var scrollTop = $(window).scrollTop();
if(scrollTop != 0){
$('#header').stop().animate({'opacity':'0'},400);
}
}
);
});
</script>