Fade out menu doesn't work in IE8
Posted
by
user1787488
on Stack Overflow
See other posts from Stack Overflow
or by user1787488
Published on 2012-10-31T04:58:27Z
Indexed on
2012/10/31
5:00 UTC
Read the original article
Hit count: 120
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>
© Stack Overflow or respective owner