$(window).scroll(function () {
var scrollTop = $(this).scrollTop();
var scrollHeight = $("#div").offset().top;
var windowHeight = $(this).height();
if ((scrollTop + windowHeight) > scrollHeight) {
}
})
页面滚动条滚动到div位置时执行if里的事件
$(window).scroll(function () {
var scrollTop = $(this).scrollTop();
var scrollHeight = $("#div").offset().top;
var windowHeight = $(this).height();
if ((scrollTop + windowHeight) > scrollHeight) {
}
})