CODE:
$(document).bind('mousewheel DOMMouseScroll MozMousePixelScroll', function (e) {
if (e.originalEvent.wheelDelta / 120 > 0) {
if ($(window).scrollTop() == 0) {
$(".master_footer").css({ "position": "fixed", "top": "" });
$("#reasons").hide();
}
}
else {
if ($(window).scrollTop() < $(document).height() - $(window).height()) {
$("#reasons").fadeIn(2000);
$(".mr_new_footer_divide").fadeIn(2000);
$(".master_footer").css({ "position": "relative", "bottom": "5px" });
}
}
});
以上代码适用于Safari和Chrome。在Firefox上,唯一不起作用的是:
$(".master_footer").css({ "position": "fixed", "top": "0px" });
当向上滚动时,上面的行在firefox上不起作用。我该怎么做才能解决它?