[英]My load on scroll doesn't work on IE 8
IT's all in the title, the loading on scroll is working fine on chrome and FF but not in IE 8 一切都在标题中,滚动加载在chrome和FF上工作正常,但在IE 8中却不能
var lastScrollTop = 0;
$(window).scroll(function(){
var st = $(this).scrollTop();
if (st > lastScrollTop){
openFromButton()
}
lastScrollTop = st;
});
It seems that the problem comes from scrollTop 看来问题出在scrollTop
Try document instead of window. 尝试使用文档而不是窗口。
var lastScrollTop = 0;
$(document).scroll(function(){
var st = $(this).scrollTop();
if (st > lastScrollTop){
openFromButton()
}
lastScrollTop = st;
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.