0
我的下面的代碼(or jsfiddle)不起作用。不過,它確實適用於我的移動應用程序。它應該做的是使箭頭(滾動到底部按鈕)在底部淡出,然後在返回時淡入視圖中。滾動到底部不發射行爲
爲什麼它不能在瀏覽器(鉻)?
$(window).bind("mousewheel DOMMouseScroll scroll swipe touchmove touchstart", function (e) {
var hT = $('#bottom').length ? $('#bottom').offset().top : 0,
hH = $('#bottom').outerHeight(),
wH = $(window).height(),
wS = $(this).scrollTop();
if (wS > (hT + hH - wH)) {
$('.saveForm').fadeOut();
} else {
$('.saveForm').fadeIn();
}
});
Doh!謝謝。有時你需要另一雙眼睛。 –