3个回答
展开全部
var flag = true;
$(window).scroll(function () {
var me = $(this), div1 = $('#div1');
var scrollTop = me.scrollTop();
var scrollHeight = $(document).height();
var windowHeight = me.height();
if(((scrollHeight - scrollTop - windowHeight) <= 100) && flag){
div1.click();
flag = false;
}else{
flag = true;
}
});
$(window).scroll(function () {
var me = $(this), div1 = $('#div1');
var scrollTop = me.scrollTop();
var scrollHeight = $(document).height();
var windowHeight = me.height();
if(((scrollHeight - scrollTop - windowHeight) <= 100) && flag){
div1.click();
flag = false;
}else{
flag = true;
}
});
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询