$(window).scroll(function () {
var scrollTop = $(this).scrollTop()
var windowHeight = $(this).height()
var scrollHeight = $(document).height()
console.log('-----------------------')
if((scrollTop+windowHeight)>scrollHeight){
console.log('bottom')
}
console.log(`scrollTop: ${scrollTop}`)
console.log(`windowHeight: ${windowHeight}`)
console.log(`scrollHeight: ${scrollHeight}`)
})
想要移动底部触发事件,是我哪里写的不对吗,一直不能正确获取
相关分类