想象这是我的页面:<p>hello</p><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><p class="myPara">My Paragraph</p>当用户向下滚动到类别为“ myPara”的段落而不是之前时,如何提示消息?
3 回答

杨魅力
TA贡献1811条经验 获得超6个赞
$(window).scroll(function(){
console.log($('#myPara').offset().top < $(this).height() + $(this).scrollTop());
});
- 3 回答
- 0 关注
- 765 浏览
添加回答
举报
0/150
提交
取消